Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
popsha
Amateur
Amateur
Posts : 60
Join date : 2012-04-14

unable to capture onChange event handler Empty unable to capture onChange event handler

Wed Jun 06, 2012 10:21 am
could not handle a drop down box, which has' onchange' event handler

selecting a text from drop down will show a link otherwise not.
running the script, selects drop down and the link is shown but could not clink on the link as the script breaks

can anyone help me out.my code snippet is below:

selenium.select("name=product", "label=Aero");
selenium.fireEvent("name=product", "change");
Thread.sleep(3000);
selenium.click("//tr[6]/td[2]/a");
avatar
Love Sharma
Regular Participant
Regular Participant
Posts : 27
Join date : 2012-06-01

unable to capture onChange event handler Empty Re: unable to capture onChange event handler

Wed Jun 06, 2012 10:38 am
Hi,
1. If I understood you correctly then you are able to select the desired option from drop down and hence the link is visible
2. You trying to click on the link by using selenium.click("//tr[6]/td[2]/a"); 3. The script could not reach this code statement because it get failed before reaching this line itself or while reading this statement?
avatar
popsha
Amateur
Amateur
Posts : 60
Join date : 2012-04-14

unable to capture onChange event handler Empty Re: unable to capture onChange event handler

Wed Jun 06, 2012 10:53 am
yes, can you suggest a soluition
avatar
Love Sharma
Regular Participant
Regular Participant
Posts : 27
Join date : 2012-06-01

unable to capture onChange event handler Empty Re: unable to capture onChange event handler

Wed Jun 06, 2012 12:22 pm
well if the script is unable to click the link then either xpath is not correct or you need to increase timer. Per my understandings, link is appearing only after selection of dropdown and hence could be the reason that it is not visible when system try to click it.

If this is not the case then please provide more info about error and confirm if the issue arises with this statement only(selenium.click("//tr[6]/td[2]/a");?
Sponsored content

unable to capture onChange event handler Empty Re: unable to capture onChange event handler

Back to top
Permissions in this forum:
You cannot reply to topics in this forum