mercredi 31 juillet 2019

Clicking on a button with dynamic selector in python selenium webdriver

I am working on this automation thing and I am trying to click on this button with selector

<button id="ember2570" class="ember-view btn btn-default btn btn-default" type="button">    <i class="fa fa-upload"></i>
PDMLink<!----></button>

I have tried find_element_by_id but the ID changes with every reload and the class names are also not unique to the button. if I try including wildcard like "ember*" then it clicks somewhere else. Almost all the elements of the web page has id="embersomeRandomNumber" I cannot share the url as it is an intranet site.




Aucun commentaire:

Enregistrer un commentaire