So, imagine a page that has the following HTML:
<button data-my-custom='{"fileName":"SomethingRandom.zip"}'>
Download build 1023
</button>
There will be several of these on the page, each will have a different filename value for the data-my-custom HTML 5 attribute.
How can I get the elements that contain the HTML5 attribute "data-my-custom" in Selenium?
I cannot figure out if I should use XPATH and if so, what the expression would be?
Thank you.
//button[@data-my-custom].button[data-my-custom], orbutton[data-my-custom=<{yourFileNameObject}>]if you want to find a specific one.