Issue: Hey there, I'm currently working on testing a CMS tool with selenium in C#. The problem I'm facing is finding a suitable selector for a small drop-down button due to the random generation of IDs for all selectors. Every time the script runs, the IDs change along with other identifiers in the HTML code generated.
Attempted Solution: I attempted to save the Xpaths of all drop-down buttons on the page into an array and then tried clicking on the element based on its position in the array. However, I was unsuccessful in storing any element Xpath in the array.
Please advise on what steps I can take in this situation. It could potentially involve dealing with a JavaScript-enabled page.
HTML Code Snippet for the Element:
<span class="epi-extraIcon epi-pt-contextMenu epi-iconContextMenu" role="presentation" title="Display menu" data-dojo-attach-point="iconNodeMenu" _dijitmenuuniqname_51_43="1"/>