c# - Search for a button by its HTML Code -


i writing coded ui test's web app. having problems such record actions using test builder, button clicked has different information each time run test , result vs can't find button.

the html code never changes want find button html code , click way.

for example on google path search button

<button id="gbqfba" aria-label="google search" name="btnk" class="gbqfba"><span id="gbqfsa">google search</span></button> 

how can click button using code above or alternativly using xpath

//*[@id="gbqfba"] 

any appreciated.

adjust search properties , filter properties.


Comments