pkudrys
2 years agoContributor
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):
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.