I need to select elements from an auto complete list which appears when you type something on the text field.
I have entered the text "Program NPL" and following two options show up
LD Program NPL -1 and
Program NPL - 4
I want to choose the second one but cannot use text()='' because the number at last is dynamic and can change in future.
I tried "starts-with" . It works for now but suppose if there is a value like "Program NPL ABC - 4". Then it won't work. Kindly suggest some solution. Thanks
This XPATH should work
//*[starts-with(text(),'Program NPL -')]