bmihura Posted August 5, 2005 Posted August 5, 2005 How do I get AutoIt to wait for items in a browser (on a web page) to show up, like buttons or text boxes or hyperlinks? WinWaitActive is nice for operating system windows, but does AutoIt have functions for handling items within web pages? If not, is there something other than AutoIt for web pages?
AutoChris Posted August 5, 2005 Posted August 5, 2005 How do I get AutoIt to wait for items in a browser (on a web page) to show up, like buttons or text boxes or hyperlinks?WinWaitActive is nice for operating system windows, but does AutoIt have functions for handling items within web pages?If not, is there something other than AutoIt for web pages?<{POST_SNAPBACK}>I usually stick with the basics when writing scripts--especially simple scripts. What I usually do when waiting for a page to load is to do a PixelGetColor on the Stop Loading This Page icon on the top of the Mozilla browser to see if the pixel color is no longer red (meaning the page is finished loading.)On IE, you can just do a StatusBarGetText ("Title", "Text", 1) and look for the word Done to see if the page has finished loading.Once the page is fully loading, you can be pretty sure the buttons/hyperlinks have loaded as well.
DaleHohm Posted August 5, 2005 Posted August 5, 2005 The StatusBarGetText method is simple and is a good solution.If your interaction needs with IE are more complex however, have a look at the IE Automation UDF Library. The code below will create a browser window, navigate to a page and wait for the page to finish loading before returning control to you:#include <IE.au3> $oIE = _IECreate() _IENavigate("www.autoitscript.com")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
dandv Posted January 18, 2012 Posted January 18, 2012 Is it really impossible to determine when a web page has finished loading in Chrome? I tried WinWaitActive() and passed a text parameter of "help" because the page I need to load has the word help at the bottom, but the script never reaches past that point. ... Send("https://support.twitter.com/forms/general{ENTER}") Sleep(1000) WinWaitActive("Twitter Help Center - Google Chrome","help") ; never here
somdcomputerguy Posted January 18, 2012 Posted January 18, 2012 If not, is there something other than AutoIt for web pages?Maybe you can do something with this, the REBOL Language. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now