Jump to content

IE Object ready-state problem


Recommended Posts

I am using IE to automate a web page. When the page is scanning, the button I am after does not show (visible) until the scan is complete. However, it is found in the source.

If IsObj($button4) Then

MsgBox(0,0, "is an object button 4 ") ; **** this works

MsgBox(0,0, _IEPropertyGet ($button4, "readystate"))

EndIf

error...

IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType

is there another way to wait until the button is "visible" or not "disabled"

Thanks

Valuater

8)

NEWHeader1.png

Link to comment
Share on other sites

Applies To:

document, FRAME, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, LINK, SCRIPT, TABLE, TBODY, TD, TFOOT, TH, THEAD, TR, Element Constructor, HTMLDocument Constructor

Yup, it's supposed to return "Complete" if the button is ready assuming it's strictly an input element and not javascript's makeup.

#include <IE.au3>

Dim $o_IE = _IECreate('http://www.google.com/')
Dim $oElem = _IEGetObjByName($o_IE, 'btnG')
ConsoleWrite($oElem.ReadyState & @LF)
Link to comment
Share on other sites

Visibility is not tied to readyState.

visible or disabled is an element attribute. If you show the button HTML before and after I could give you precise way to test. Without that, I can suggest that you use StringInStr on the result of _IEPropertyGet($button4, "outerhtml")

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

Thanks guys!!

If you show the button HTML before and after I could give you precise way to test.

If I knew the HTML after I would know enough to do what I need. I am actually not going to push the button, it's just a way to tell that the page is finished.

I will test with your suggestion dale

Thanks

Valuater

8)

NEWHeader1.png

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