javascript - WebdriverJS and drop down menus -


i running webdriverjs on nodejs test ui of website. want select , click on submenu item in drop down menubar. submenu items hidden css. menubar looks this:

<ul class="dropdown" id="mainnavlist">     <li class="active">          <a href="/home"><span>home</span></a>     </li>     <li class="">         <a href="/myproducts"><span>my products</span></a>         <ul style="visibility: hidden;">             <li class="">                 <a href="/uiuiu">product a</a>             </li>             <li class="">                 <a href="/jkjkjk">product b</a>             </li>         </ul>     </li>      <li>...</li>  </ul> 

if try run approach:

mydriver.executescript("return $(\"a:contains('my products')\").mouseover();").then(function(){ mydriver.findelement(mywebdriver.by.xpath("//a[contains(text(), 'product b')]")).click();         }); 

the drop down slides down hides directly after showing it. on console error webdriver:

elementnotvisibleerror: element must displayed click (warning: server did not provide stacktrace information)

any ideas?

this new me chain function calls of click on drop down click drop down item want.


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -