How might I execute the javascript submenu triggered by this button, "x-auto-54"?
<table id="x-auto-54"
class=" x-btn avtar-x-btn x-component x-btn-noicon x-unselectable "
cellspacing="0" role="presentation" unselectable="on">
The ultimate goal, is then to click this submenu link, \\a[@id="x-auto-89"]:
<div id="x-auto-55" class=" x-ignore x-menu x-component " style="z-index: 1053; width: 118px; display: block; position: absolute; left: 1095px; top: 18px;" tabindex="0" hidefocus="true" aria-labelledby="x-auto-54">
<div class=" x-menu-list" style="height: 96px;">
<div id="x-menu-el-x-auto-89" class="x-menu-list-item ">
<a id="x-auto-89" class=" x-menu-item x-component" href="#"></a>
</div>
<div id="x-menu-el-x-auto-90" class="x-menu-list-item "></div>
<div id="x-menu-el-x-auto-91" class="x-menu-list-item "></div>
<div id="x-menu-el-x-auto-92" class="x-menu-list-item "></div>
</div>
</div>
</body>
</html
I found these buttons using the Selenium IDE (after clicking them while recording). The entire source is otherwise very very large (I will post upon request if necessary).
My strategy has been to access each hierarchal tag one at a time, so as to catch where the WebElements are no longer able to be found (in this case the submenu isn't opening so x-auto-89 isn't found):
a54 = driver.find_element_by_id('x-auto-54')
hover = ActionChains(driver).move_to_element(a54).click()
hover.perform()
driver.find_element_by_id('x-auto-89').click()
this clicking code was referenced according to these solutions: 1, 2,