Option 1:
You can use the xpath of the menu item and click on the item directly. Check the below snippet (used to click on the 'Support Matrix -> Windows Support Matrix" menu item.
Option 2:
You can use the mouse over on until you hit the last item and then click on the last menu item in the input. Below is the skeleton of code (did not got a chance to execute, so please modify the function as per need.)
Let me know if you need any more help on this.
You can use the xpath of the menu item and click on the item directly. Check the below snippet (used to click on the 'Support Matrix -> Windows Support Matrix" menu item.
Code:
Browser().Page().WebElement("xpath:=//ul[@id="primary"]//a[text()='Windows Support Matrix']").Click
Option 2:
You can use the mouse over on until you hit the last item and then click on the last menu item in the input. Below is the skeleton of code (did not got a chance to execute, so please modify the function as per need.)
Code:
Public Function SelectMenuItem(oPage,sMenuPath)
'Make sure the path contains submenu items and path is mentioned correctly
If instr(sMenuPath,"->")>0 Then
aMenuItems = Split(sMenuPath,"->")
End If
'Loop through the menu items and click on the last item
For iMenuItem = lbound(aMenuItems) to Ubound(aMenuItems)-1
oPage.WebElement("xpath:=//a[text()='" & aMenuItems(iMenuItem) & "']").FireEvent "onmouseover"
Next
oPage.WebElement("xpath:=//a[text()='" & aMenuItems(ubound(aMenuItems)) & "']").Click
End Function
Let me know if you need any more help on this.
Thanks,
SUpputuri
SUpputuri