0

I need to configure xpath or css for selection under red border i.e a name contains "Patient List"

enter image description here

2
  • May be you want to provide html snippet instead of image.
    – Rao
    Commented Jul 8, 2016 at 8:41
  • Flagged the question because it is not test related. Commented Jul 14, 2016 at 18:42

2 Answers 2

1

I know that you asked for either XPath of CSS but do not forget if you are using selenium webdriver you could also use linkText and partialLinkText.

Here is a Java example of find by "linkText" then click:

driver.findElement(By.linkText("Patient List")).click();

Or you could also use "partialLinkText" then click:

driver.findElement(By.partialLinkText("Patient List")).click();
1

This should be quite simple with xpath:

//li[@class='open']//a[text()='Patient List']

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.