- dkpune
- Posts : 6
Join date : 2012-03-14
Unable to handle popup
Thu Mar 15, 2012 9:42 pm
There is a popup box in the application with input box, OK and Cancel button. I am not able to click on cancel or enter user name in the input box. I got the object ids of elements but IE crashes when I do anything on any element of this popup. keyPress works on this popup but focus is not on the popup and I am not able to bring it into focus by any way. Can anyone suggest me how to bring the focus to this popup.
- Sanjay SRegular Participant
- Posts : 34
Join date : 2012-02-10
Age : 37
Location : Chennai
Re: Unable to handle popup
Fri Mar 16, 2012 1:00 pm
Hi..
You can use the below following commands to perform cancel or enter option in the pop up window..
chooseCancelOnNextConfirmation (or) chooseOkOnNextConfirmation
And i usually perform close option in my popup window by giving the below following commands..
click :
waitForPopUp :
windowFocus :
selectWindow : (Window's title)
close :
selectWindow : null
You can use the below following commands to perform cancel or enter option in the pop up window..
chooseCancelOnNextConfirmation (or) chooseOkOnNextConfirmation
And i usually perform close option in my popup window by giving the below following commands..
click :
waitForPopUp :
windowFocus :
selectWindow : (Window's title)
close :
selectWindow : null
- dkpune
- Posts : 6
Join date : 2012-03-14
Re: Unable to handle popup
Fri Mar 16, 2012 8:51 pm
I tried above suggestions but it is not working. I tried chooseCancelOnNextConfirmation, windowFocus, selectWindow, etc.
I guess this is not working because this is a modal window. Has anyone worked on handling modal windows which is developed in java.
Any suggestions pls
I guess this is not working because this is a modal window. Has anyone worked on handling modal windows which is developed in java.
Any suggestions pls
- jayz123
- Posts : 8
Join date : 2012-11-14
Re: Unable to handle popup
Mon Nov 19, 2012 2:45 pm
u may get the id of the button u wish to click first by using the selenium.FindElementId("id=xxxxxxxx") function... after that u may just simply selenium.Click("id=xxxxxxxx");
I used it to click button "X" for the modal dialog popup ....
I used it to click button "X" for the modal dialog popup ....
Permissions in this forum:
You cannot reply to topics in this forum