0

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

enter image description here

  • May be you want to provide html snippet instead of image. – Rao Jul 8 '16 at 8:41
  • Flagged the question because it is not test related. – Sascha Kretzschmann Jul 14 '16 at 18:42
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();
|improve this answer|||||
1

This should be quite simple with xpath:

//li[@class='open']//a[text()='Patient List']
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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