0

I am trying to automate SharePoint test cases. I am finding an issue while finding an element locator for actual result, updated by, update date. Does anyone know how to find the locators?

HTML:

<i data-icon-name="Edit" class="ms-Button-icon icon-70" role="presentation" aria-hidden="true"></i> 

It's an edit icon where I have to click

  • Please share the html dom, what have you done so far and what is the issue that you are facing. – Kshetra Mohan Prusty Sep 6 '18 at 8:27
  • HTML:<i data-icon-name="Edit" class="ms-Button-icon icon-70" role="presentation" aria-hidden="true"></i> it's an edit icon where i have to click. – Amit Vishnu Sharma Sep 6 '18 at 10:17
0

This is pretty straight-forward. Try the below xpath for locating the element.

"//i[@data-icon-name='Edit']"

You might also add the role attribute in the xpath but I think this would be sufficient. I am not sure if this is clickable, if not then write the locator for its parent element in the DOM.

It's better to share the some portion of the DOM not a single tag.

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.