Select Drop-down List using Selenium 1 or 2 -


i need navigate frames clicking drop-down list using selenium. need select links on menu , drop-down list. selenium.click doesn't work.

on manual execution: mouse-over subscriber link/menu list dropped down click selected link/menu drop-down list

i need automate through selenium.

here element inspector firebug:

<!doctype html public "-//w3c//dtd xhtml 1.0 frameset//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-frameset.dtd"><html xmlns="http://www.w3.org/1999/xhtml">       <!-- generated python html module ($revision: 1.6 $). -->        <!-- charset : iso-8859-1 -->     <head> … </head> <frameset rows="78,62,32,*" frameborder="no" border="0">     <frame scrolling="no" src="/html/header_frame.html" noresize="1" name="head_frame"></frame>     <frame scrolling="no" src="/cgi-bin/main/title.cgi" noresize="1" name="titleframec"></frame>     <frame scrolling="no" src="/cgi-bin/main/navigationframe.cgi" noresize="1" name="navframe">#document<!doctype html public "-//w3c//dtd xhtml 1.0 frameset//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-frameset.dtd"><html xmlns="http://www.w3.org/1999/xhtml">       <!-- generated python html module ($revision: 1.6 $). -->        <!-- charset : iso-8859-1 -->     <head> … </head>     <body class="nav_frame" marginwidth="0" marginheight="0" onload="parent.bodyframe.location='/cgi-bin/service/subscriber/subscriberdetails.cgi';" topmargin="0" leftmargin="0"><script language="javascript"> … </script>     <table class="nav_frame" cellspacing="0" cellpadding="0" border="0">         <tbody>         <tr>             <td> … </td>             <td><a onmouseout="mm_starttimeout();" onmouseover="mm_showmenu(menu_subs,0,0,null,'subscriber_bt');" href="javascript:;"><img width="125" height="32" border="0" alt="" src="/nav_images/subscriber_bt.jpg" name="subscriber_bt"></img></a></td>             <td> … </td>             <td> … </td>             <td> … </td>             <td> … </td>             <td> … </td>             <td> … </td>             <td> … </td>             <td> … </td>        </tr>        </tbody>     </table>     <script language="javascript"> … </script>     <form name="navig" target="bodyframe" method="post" action="/cgi-bin/service/subscriber/subscriberdetails.cgi"> … </form>     </body>     </html> </frame> <frame name="bodyframe"> </frame> </frameset><noframes> … </noframes> </html> 

actual drop-down list

you'd need use actions() class of webdriver.

actions action = new actions(driver); actions.movetoelement(driver.findelement(by.id("subscriber_element"))).movetoelement(driver.findelement(by.id("revealed_element"))).click().build().perform(); 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -