Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

unable to capture onChange event handler

View previous topic View next topic Go down

unable to capture onChange event handler

Post by popsha 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");

popsha
Amateur
Amateur

Posts : 60
Join date : 2012-04-14

Back to top Go down

Re: unable to capture onChange event handler

Post by Love Sharma 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?

Love Sharma
Regular Participant
Regular Participant

Posts : 27
Join date : 2012-06-01

Back to top Go down

Re: unable to capture onChange event handler

Post by popsha on Wed Jun 06, 2012 10:53 am

yes, can you suggest a soluition

popsha
Amateur
Amateur

Posts : 60
Join date : 2012-04-14

Back to top Go down

Re: unable to capture onChange event handler

Post by Love Sharma 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");?

Love Sharma
Regular Participant
Regular Participant

Posts : 27
Join date : 2012-06-01

Back to top Go down

Re: unable to capture onChange event handler

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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