ygoldshtrakh Posted August 25, 2005 Share Posted August 25, 2005 Hi everybody, I'm trying to add validation to y script however i cannot figure out how _IEBodyReadHTML works and there are not enough example i could find. What i would like to see is something like that after submit button is clicked wait for the page to laod Readhtml verify that the content of the list box or title of the page or image got there Is it at all possible? Thank you Y.G Link to comment Share on other sites More sharing options...
DaleHohm Posted August 26, 2005 Share Posted August 26, 2005 Yes, it's possible... the Title is not in the body however, it is in the HEAD section, so you cannot get it with BodyRead... there is another way however. I have to run at the moment, but unless someone else beats me to an example, I'll enter more in this response later this evening. 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 More sharing options...
DaleHohm Posted August 26, 2005 Share Posted August 26, 2005 (edited) Here's some sample code using _IEBodyReadHTML() that will hopefully help you. $oIE = _IECreate() _IENavigate($oIE, 'http://www.somesite.com') ; _IEBodyReadHTML returns the HTML between <BODY> and </BODY> ; $s_HTMLbefore = _IEBodyReadHTML($oIE) ; work with your form here - submit, whatever _IELoadWait($oIE) $s_HTMLafter = _IEBodyReadHTML($oIE) ; now compare the contents of $s_HTMLbefore and $s_HTMLafter If you want to get the HTML for the entire document, you can use the following instead: $s_HTML = $oIE.document.getElementsByTagName("HTML").item(0).outerHTML Dale Edited August 26, 2005 by DaleHohm 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 More sharing options...
ygoldshtrakh Posted August 26, 2005 Author Share Posted August 26, 2005 Thank you Dale,is there any simple way to read just what is in the list box?Once agaiin thanks a tonHere's some sample code using _IEBodyReadHTML() that will hopefully help you.$oIE = _IECreate() _IENavigate($oIE, 'http://www.somesite.com') ; _IEBodyReadHTML returns the HTML between <BODY> and </BODY> ; $s_HTMLbefore = _IEBodyReadHTML($oIE) ; work with your form here - submit, whatever _IELoadWait($oIE) $s_HTMLafter = _IEBodyReadHTML($oIE) ; now compare the contents of $s_HTMLbefore and $s_HTMLafterIf you want to get the HTML for the entire document, you can use the following instead:$s_HTML = $oIE.document.getElementsByTagName("HTML").item(0).outerHTMLDale<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
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