herosdei Posted January 10, 2014 Share Posted January 10, 2014 Using function _IEDocInsertHTML with autoit 3.2 and internet explorer 9 give back the following message: $_IEStatus_InvalidObjectType, Expected document element. Looking at IE.au3 you can see a if block: If Not __IEIsObjType($o_object, "browserdom") Or __IEIsObjType($o_object, "documentcontainer") Or __IEIsObjType($o_object, "document") Then __IEConsoleWriteError("Error", "_IEDocInsertHTML", "$_IEStatus_InvalidObjectType", "Expected document element") Return SetError($_IEStatus_InvalidObjectType, 1, 0) EndIf If you limit the control to __IEIsObjType($o_object, "browserdom") the function works, so probably something goes wrong with the evaluation. You can easily reproduce the problem with the following code: #include <IE.au3> Local $oIE = _IECreate("http://www.autoitscript.com") Local $oBody = _IETagNameGetCollection($oIE, "body", 0) _IEDocInsertHTML($oBody, "<h2><font color=red>This HTML is inserted After Begin</font></h2>", "afterbegin") _IEDocInsertHTML($oBody, "<h2><font color=red>This HTML is inserted Before End</font></h2>", "beforeend") Hope this Helps. Heros Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 10, 2014 Moderators Share Posted January 10, 2014 herosdei,If you are using a version as outdated as 3.2 (the final 3.2.12.1 release was over 5 years ago) then you will not get a lot of sympathy - nor understanding as I doubt anyone here (except perhaps Zedna) runs anything that old. I suggest you update and see if the problem still exists. M23 herosdei 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Danp2 Posted January 10, 2014 Share Posted January 10, 2014 Using function _IEDocInsertHTML with autoit 3.2 and internet explorer 9 give back the following message Your code ran without error for me. Suggest that you upgrade to AutoIt v3.3.10.2 and try again. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Solution herosdei Posted January 16, 2014 Author Solution Share Posted January 16, 2014 You are right guys, probably I was using a very old autoit version (dont know why, but that's my problem) Thank you for your ansswer in any case. Bye, Heros 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