RakeshSharma Posted December 28, 2011 Share Posted December 28, 2011 Hi All, I am using selenium to automate the website. There is java script pop which is coming after clicking on button. I want to click first on "CONFIRM" button and the handle this pop up thru auoit script. <tr> <td> <form id="theForm2" onsubmit="return checkSubmit()" action="/AdminWeb/com/primustel/admin/presentation/guadmin/custMgt/cancelPageFlow/checkDID.do" method="post" name="confirmCancelForm"> <input type="image" src="/AdminWeb/resources/images/buttons/confirm.gif"> </form> <script type="text/Javascript" language="Javascript"> <!-- // Build the netui_names table to map the tagId attributes // to the real id written into the HTML if (netui_names == null) var netui_names = new Object(); netui_names.theForm2="theForm2" --> </script> Please help. Thanks, Rakesh Link to comment Share on other sites More sharing options...
Sticky Posted December 31, 2011 Share Posted December 31, 2011 So selenium is clicking confirm and you're just needing AutoIt to continuously poll for a new javascript pop up and perform an action on it such as clicking Ok? Link to comment Share on other sites More sharing options...
RakeshSharma Posted January 4, 2012 Author Share Posted January 4, 2012 Thanks Sticky for replying. Yes after clicking on button i want to handle/click on OK or cancel using autoit. I tried this : AutoItSetOption("WinTitleMatchMode","2") $title = WinGetTitle("[active]") ; retrives whole window title WinActive($title); send("{TAB}") Send("{ENTER}") but while that popup is active autoit returns main page as $title not the pop up. Thanks, Link to comment Share on other sites More sharing options...
Jaboowaki Posted March 1, 2012 Share Posted March 1, 2012 I'm having the same situation with my project as well, any suggestions? I tried the same code you did before trying the forums. I need to click on a tree in a popup window but my script only sees the main page. Link to comment Share on other sites More sharing options...
Robjong Posted March 1, 2012 Share Posted March 1, 2012 (edited) It's a window, WinList with a loop and WinGetText should get you there give you an idea.Edit: what I meant to say was, use the text of the popup to identify it. Edited March 1, 2012 by Robjong Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now