Jump to content

IE Automation with popup


Recommended Posts

Use DebugBar "Spy" - that icon in the toolbar that looks like an eye.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Use DebugBar "Spy" - that icon in the toolbar that looks like an eye.

Dale

Dear Dale,

I can locate the field name. Thank a lot!

However, I want to change the field Dem_TaxId and Dem_TaxIdType with attached script and fail. I would like to see your professional advice

Sorry, I attached the wrong file. Please see Customer IDSSN.zip

Customer IDSSN.zip

Edited by wchan2122
Link to comment
Share on other sites

Certainly can't run your test since these are private pages, but I'd suggest that you need to use _IEAttach, DialogBox to attach to the popup before you can access the fields you are trying to change.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Dear Dale,

Thank for your advice,

However, I find my code stops on after the script line " _IELinkClickByText($oIE, "Edit")" (click to activate the Dialog Box). After investigation, the code is actually pended on IE.au3 Line 558 (_IELoadWait function).

_IELinkClickByText ($oIE, "Contacts")

_IELinkClickByText($oIE, "Edit")

;--Edit Contact PopUp------------------------------------------------

$oPopup = _IEAttach("Edit Contact", "DialogBox")

$o_form = _IEFormGetCollection ($oPopup, "DEM_Form")

$o_TaxId = _IEFormElementGetObjByName ($o_form, "Dem_TaxId")

$o_TaxIdType = _IEFormElementGetObjByName ($o_form, "Dem_TaxIdType")

_IEFormElementSetValue ($o_TaxId, $SSN)

_IEFormElementOptionselect ($o_TaxIdType,"SSN", 1, "byText")

$o_OK_Button = _IEFormElementGetObjByName ($o_form, "Dem_SaveButton1")

_IEAction ($o_OK_Button, "click")

Link to comment
Share on other sites

If your analysis is correct, use the NoWait parameter with _IELinkClickByText

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Dear Dale,

The script is still pending after I change the setting to "_IELinkClickByText($oIE, "Edit",0,0)"

The script can only resume after I dismiss the dialog box.

_IELinkClickByText ($oIE, "Contacts")

_IELinkClickByText($oIE, "Edit",0,0)

;--Edit Contact PopUp------------------------------------------------

$oPopup = _IEAttach("Edit Contact", "DialogBox")

$o_form = _IEFormGetCollection ($oPopup, "DEM_Form")

$o_TaxId = _IEFormElementGetObjByName ($o_form, "Dem_TaxId")

$o_TaxIdType = _IEFormElementGetObjByName ($o_form, "Dem_TaxIdType")

Link to comment
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
 Share

  • Recently Browsing   0 members

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