Jump to content

Recommended Posts

Posted (edited)

I am trying to write a script to complete all the mandatory fields in a form and submit it successfully. One of the problems I am facing is one of the mandatory fields appears in a popup window (or more precisely a dialog box that doesn't appear as a new window).

When I click on a particular link on the web page, the window.showModalDialog method is called. This dialog box contains a form which contains a drop-down menu. I need to be able to select one of the values from the drop-down menu and then close this dialog box.

Can anyone tell me how to get a handle of the dialog box and then access the form fields.

Edited by pc1002
  • 2 weeks later...
Posted

I am trying to write a script to complete all the mandatory fields in a form and submit it successfully. One of the problems I am facing is one of the mandatory fields appears in a popup window (or more precisely a dialog box that doesn't appear as a new window).

When I click on a particular link on the web page, the window.showModalDialog method is called. This dialog box contains a form which contains a drop-down menu. I need to be able to select one of the values from the drop-down menu and then close this dialog box.

Can anyone tell me how to get a handle of the dialog box and then access the form fields.

I wanted to share with you our solution to this problem. Well, its not really a solution but a workaround. Instead of clicking on a link to open the dialog box, we decided to open the dialog box manually using like:

$window = $IE_object.document.parentwindow.showModelessDialog($url)

This allowed us to get a handle on the dialog box.

Posted

I am trying to write a script to complete all the mandatory fields in a form and submit it successfully. One of the problems I am facing is one of the mandatory fields appears in a popup window (or more precisely a dialog box that doesn't appear as a new window).

When I click on a particular link on the web page, the window.showModalDialog method is called. This dialog box contains a form which contains a drop-down menu. I need to be able to select one of the values from the drop-down menu and then close this dialog box.

Can anyone tell me how to get a handle of the dialog box and then access the form fields.

could you include a screenshot of the autoit window info? probably one for the parent window and the one you want to read from would be best.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...