pkudrys
3 years agoFrequent Contributor
xpath finds an incorrect object in TC, but the same xpath works fine in Chrome
Hi guys,
I'm experiencing an issue where given xpath finds an incorrect object in TC, but the same xpath works fine in Chrome. The xpath looks like this:
//mat-sidenav[contains(@style,'visibility: visible')]//input[@id=(//label[contains(.,'Key')]/@for)]
This is how the xpath works in Chrome (finds correct element in given sidenav panel):
xpath fins correct input, based of its label
The same xpath finds input in the main page, instead of sidenav panel...
Do you have an idea about the reason of this problem? Thanks.