selenium - how to hover over menu and sub menu -


with following code, able hover , click on 1 level hierarchic. ctl00_mnumainn2 -> new

public static void openfundnewpagetest()     {     navigatefrommainpage("td#ctl00_mnumainn2", "new");     //driver.findelement(by.linktext("new")).click();     waitforpageload();     }  public static void navigatefrommainpage(string objectidentifier, string menulink)     {     string js = "$(" + "'" + objectidentifier + "'" + ").mouseover();";     ((ijavascriptexecutor)driver).executescript(js);     driver.findelement(by.linktext(menulink)).click();     } 

if there multiple level of submenu ctl00_mnumainn2 -> fund -> hierachi -> new how can make them work?

also not able identify link on page.

you can use this

webutilities.executescript(driver, "$('.context_menu').show()"); 

replace '.context_menu' respective css selector.

then can find element , click it.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -