On Google , inspecting an Element and copying it’s gives me the following value

//*[@id='Body']/app-root/app-generic-product/section[2]/div/app-product-summary-list/app-product-summary[2]/div/div[4]/button[2]

I have tried getting the xPath of the same element in and it gives a different path:

/html/body/app-root/app-generic-product/section[2]/div/app-product-summary-list/app-product-summary[2]/div/div[4]/button[2]

My main test browser is in Chrome, and I tried the one provided by Firefox. It worked.

My Question is which is much more , the one provided by Firefox or Chrome? In terms of testing with other Browsers (IE, Opera) and in terms of stability (if a developer makes very slight changes unrelated to the element.. will it break the xpath?)



Source link https://sqa.stackexchange.com/questions/34796/xpath-which-is-much-more-reliable--chrome-or-firefox

LEAVE A REPLY

Please enter your comment!
Please enter your name here