Is it possible to click on element by testRigor Path?

Viewed 25

I want to click on element using (testRigor Path) which I got from Selectors hub extension. is this possible? Note I can't click it on any other way since the xpath and css selector are changing frequently thus testRigor will be the best option (I am using python seleinum for that) and here's the element's outerhtml

testRigor

<a tabindex="-1" href="javascript:void(0)" aria-hidden="true" data-value="{&quot;stringVal&quot;:&quot;LV&quot;}" id="cvf_phone_cc_native_112" class="a-dropdown-link" style="" xpath="1"><span>Latvia </span><span dir="ltr">+371 </span></a>

1 Answers

In testRigor, you'd probably be better off using what's visible to the end user; in this case, either Latvia or +371.0.

click "Latvia" or click "+371.0"

The only way this wouldn't be the best approach is if the value is dynamic. In that case, it would be necessary to know more about the use case to suggest a different approach.

Related