Reputation: 7515
I am new to selenium and I am using python but I have a small question on navigating to Jquery menu in Internet Explorer. I would like to navigate to a menu which looks something like this Tools > Data Load > Data Load. I am pasting my HTML code below. I don't know which one to use for clicking on the last menu item Data load which was marked in Bold.
Please some one help me. I googled it every where but could not get right answer.
<LI class="mainmenu topmenu" sub_menu="1" level="1" jQuery1340790605409="12">Tools
<UL style="DISPLAY: none; TOP: 49px; LEFT: 383px" class="mainmenu submenu" jQuery1340790605409="214">
<LI class="mainmenu submenupointer submenu " sub_menu="1" level="2" global_level="1" menu_id="891" jQuery1340790605409="54">Data Load
<UL style="DISPLAY: none; TOP: 1px; LEFT: 109px" class="mainmenu subsubmenu" jQuery1340790605409="232">
<LI class="mainmenu subsubmenu" sub_menu="0" level="3" url_path="/Apps/Tools/DataLoad/DataLoad/FileList.asp" jQuery1340790605409="172">Data Load
<LI class="mainmenu subsubmenu" sub_menu="0" level="3" url_path="/Apps/Tools/DataLoad/DataExtracts/template.asp" jQuery1340790605409="174">Data Extracts
<LI class="mainmenu subsubmenu" sub_menu="0" level="3" url_path="/Apps/Tools/DataLoad/BehaviorMatrix/BehaviorMatrix.asp" jQuery1340790605409="176">Behavior Matrix </LI></UL>
Upvotes: 1
Views: 1159
Reputation: 3858
If you cannot see the DataLoad submenu without clicking or hovering over the following steps - Tools -> Data Load -> Data Load .
Then you will have to use the selenium Actions class to make the mouse hover(navigate) over tools -> DataLoad elements etc. You can check this link for more information on Actions .
And regarding whether to use id or class? I will suggest you use linkText or partialLinkText to find the element you are looking to click on. eg - search for elements where linkText is equal to "DataLoad"
.
Upvotes: 1