enter image description here

enter image description here

I'm trying to make Katalon chrome extension to click the dd/mm/yyyy language. But the problem is when I record the click on dd/mm/yyyy Katalon records

xpath=(.//*[normalize-space(text()) and normalize-space(.)='Select Language'])[2]/following::li[1]

Now for this, when the test case is run, it selects the Select Language value

BUT, if I select mm/dd/yyyy from the drop-down Katalon records

xpath=(.//*[normalize-space(text()) and normalize-space(.)='English (UK) - dd/mm/yyyy'])[2]/following::li[1]

And now when I run the test case, it will select mm/dd/yyyy and not dd/mm/yyyy

It seems the selection is offset by 1.

2 Answers 2


How about we enter the xPath ourselves using li tag and text() ?

For Example -:

//li[contains(text(),'English (UK) - dd/mm/yyyy')] 

Try to take xpath manually and place it in the xpath. I've tried it for Selenium IDE and it worked.

If not try to get the text.

driver.findElements(By.xpath("//*[contains(text(),'English (UK)')]"));      

Please define the xpath properly, I haven't added it in here properly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.