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

unable to capture onChange event handler

on 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");
Love Sharma
Regular Participant
Regular Participant
Posts : 27
Join date : 2012-06-01

Re: unable to capture onChange event handler

on 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?
popsha
Amateur
Amateur
Posts : 60
Join date : 2012-04-14

Re: unable to capture onChange event handler

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

Re: unable to capture onChange event handler

on 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

Re: unable to capture onChange event handler

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