Jump to content

_IEFormSubmit ($oForm) taking log time


Nishant
 Share

Recommended Posts

After _IEFormSubmit ($oForm), AutoIT script taking so much of time to complete the task.

After Submitting a Form, I want to close the Internet Esxplorer. But After IE Submit, it took such a long time to close the internet explorer.

I am using send command for this. Please help me to close it fast after form submit.

Thanks.

Here is the script:-

#include<IE.au3>

; Injecting Doc Versioning Test Data

$var="C:\Smoke Test Data\Doc Ver\DV-SM-Ship1.xml"

$oIE = _IECreate ("http://example.doc.do")

$hwnd = _IEPropertyGet ($oIE, "hwnd")

$oForm = _IEFormGetCollection ($oIE, 0)

$oFile = _IEFormElementGetObjByName ($oForm, "file")

$oFile.focus

ControlSend($hwnd, "", "Internet Explorer_Server1", $var)

; Selecting from combo box

$oForm = _IEFormGetObjByName ($oIE, "InboundDocumentForm")

$oSelect = _IEFormElementGetObjByName ($oForm, "eventName")

_IEFormElementOptionselect ($oSelect, "inbound-so-doc-Qiva-XML", 1, "byText")

_IEFormSubmit ($oForm)

;Closing Internet Explorer

Send("!f")

Send("c")

Link to comment
Share on other sites

I add WinKill command, but still it is taking so much of time

WinKill comes after _IEFormSubmit ($oForm).

In my example script, Still script is on _IEFormSubmit ($oForm), It is not come on WinKill command. But if I say my browser my _IEFormSubmit ($oForm) task was complete.

I want that _IEFormSubmit ($oForm) should be fast so that WinKill will execute and the My Task will complete.

Please HELP !

Link to comment
Share on other sites

No, These did not work. Still it is taking so much of time to close the IE after Form Submit. It should be fast. My requirement is: After form submit within 10 sec, Autov3 close the internet explorer. In Current sceanrio, it is taking 5-10 minutes.

Here is my code:-

#include<IE.au3>

$var="C:\Smoke Test Data\Doc Ver\DV-SM-Ship1.xml"

$oIE = _IECreate ("http://Example.document.do")

$hwnd = _IEPropertyGet ($oIE, "hwnd")

$oForm = _IEFormGetCollection ($oIE, 0)

$oFile = _IEFormElementGetObjByName ($oForm, "file")

$oFile.focus

ControlSend($hwnd, "", "Internet Explorer_Server1", $var)

; Selecting from combo box

$oForm = _IEFormGetObjByName ($oIE, "InboundDocumentForm")

$oSelect = _IEFormElementGetObjByName ($oForm, "eventName")

_IEFormElementOptionselect ($oSelect, "inbound-so-doc-Qiva-XML", 1, "byText")

_IEFormSubmit ($oForm)

WinWait("Inbound Document Injector - Microsoft Internet Explorer", "", 5)

;Closing Internet Explorer

WinKill("Inbound Document Injector - Microsoft Internet Explorer")

I check with Autov3 example Script name "_IEFormSubmit.au3"

Same problem with this script. Can u please check this.

Link to comment
Share on other sites

_IEFormSubmit can sometimes generate a COM error in the _IELoadWait that it calls for you.

Suggest you try this:

_IEFormSubmit ($oForm, 0)
_IELoadWait($oIE)

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

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