RakeshSharma 0 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 Share this post Link to post Share on other sites
Sticky 0 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? Share this post Link to post Share on other sites
RakeshSharma 0 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, Share this post Link to post Share on other sites
Jaboowaki 0 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. Share this post Link to post Share on other sites
Robjong 13 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 Share this post Link to post Share on other sites