Sign in to follow this  
Followers 0
RakeshSharma

javascript popup

5 posts in this topic

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">

post-69145-0-20477600-1325076217_thumb.jpost-69145-0-20477600-1325076217_thumb.j

<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



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

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

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

#5 ·  Posted (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 by Robjong

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0