Jump to content

IE9 Automation Problems


kevingy
 Share

Recommended Posts

I had to upgrade from IE8 to IE9 for work. Now, many of my AutoIt scripts that perform IE automation are broken. It would appear that there IE9 compatibility issues in AutoIt. I've done some quick and dirty debugging. It looks like calls to _IETagNameGetCollection either returns null or no results in cases where there were valid results under IE8. Furthermore, any _IE methods that rely on _IETagNameGetCollection (for example, _IEFormImageClick) also fail and/or crash.

I'll keep looking to see if I can find and fix the problem. If I find it, I'll share the fix.

Has anyone else had this issue? If you're doing IE automation and are considering IE9, I'd wait until this issue is resolved. (If you're reading this, though, it's likely already too late.)

Link to comment
Share on other sites

  • Replies 100
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Please provide reproducers. I have not worked with IE9 yet, but IE4 - IE8 updates have never broken such basic functionality.

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

Please provide reproducers. I have not worked with IE9 yet, but IE4 - IE8 updates have never broken such basic functionality.

Dale,

Thanks for the reply. The reason I had to download and install IE9 was because of issues my company was experiencing with the new browser. We had the same "it's always worked before" thoughts too. At the end of the day, we had to force IE9 to operate in IE8 standards mode to avoid lots of work (10 days before roll-out) to "fix" our compatibility issues. In our case, we were easily able to add the needed meta tag to the page header. With my automation tasks, I don't have control over the third party web sites to be able to add the tag.

The attached file will crash on IE9 with the error:

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

D:\Program Files\AutoIt3\Include\IE.au3 (1727) : ==> Variable must be of type "Object".:

For $img In $imgs

For $img In $imgs^ ERROR

Kevin

(Found a problem with the original ie9Test.au3 file. Uploaded new version that demonstrates problem.)

ie9test.au3

Edited by kevingy
Link to comment
Share on other sites

I have looked at this a bit and there is a problem (or more than one) and it appears to be on the AutoIt side. The issue I've uncovered so far relates to the ObjName function that is returning an empty string when looking at a document object. Two code snippets follow showing the AutoIt behavior followed by similar code implemented in VBScript:

#include <IE.au3>

$oIE = _IECreate ("http://wdextras.womansday.com/contests_texas.html")
ConsoleWrite(isObj($oIE.document) & " -- <" & ObjName($oIE.document) & ">" & @CRLF)

1 -- <>

set oIE = CreateObject("InternetExplorer.Application")
oIE.visible = true
oIE.navigate("http://wdextras.womansday.com/contests_texas.html")
MsgBox(TypeName(oIE.document))

HTMLDocument

Dale

Edited 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

I once had a _ExcelBookClose didn't work because ObjName returned nothing.

I was running Windows 7 64 bit with Office 2010 32 bit. As soon as I compiled the script for 32 bit everything worked fine again.

Maybe this solves your problem too?

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

@water, no everything in my test environment is 32-bit.

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

:)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I have looked at this a bit and there is a problem (or more than one) and it appears to be on the AutoIt side. The issue I've uncovered so far relates to the ObjName function that is returning an empty string when looking at a document object.

I'm glad you've found something and are working on it. Thank you!

Link to comment
Share on other sites

I came across the same issue. Solved it by putting IE9 in compatibility mode for IE8. Press F12 in the IE9 Browser and play with the two buttons on the top bar where it says "Browser Mode." Good luck. (:

I can't have all of my users do this manually every time the browser window opens. This is a good suggestion, but it won't work for me. Thanks anyway!

Link to comment
Share on other sites

I have looked at this a bit and there is a problem (or more than one) and it appears to be on the AutoIt side. The issue I've uncovered so far relates to the ObjName function that is returning an empty string when looking at a document object.

Have you reported this as a bug? If not, I can. If it's on the AutoIt side, unless one of the AutoIt devs is aware of this, it won't get fixed.

Link to comment
Share on other sites

Trac ticket is here: http://www.autoitscript.com/trac/autoit/ticket/1908

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

  • 1 month later...

Hi im new to the froums but have been scripting for a wile now since the force Install of IE9 to my WIN 7 X64 PC my automation script does not like to work on IE9 - I did some testing and works with no problems on any pc with IE8 or earlyer.

Posted Image

What the script does gets infomation from a froum makes it into an array list then downloads the list/files from a http to PC /dir.

Scrpit is for non-proffit and for a small community but not all of the community run IE8 :> ,

the community runs a lot smoother with the help of the scrpit. :unsure:

If you would like a copy of the script DaleHohm please pm me ;)

Edited by Tardis
Link to comment
Share on other sites

All I can offer now is to use Tools -> Compatibility View Settings and add the site you want to automate to the list or tell it to display all sites that way.

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 Dale ,tryed that one from looking at the other posts did not work will have to wait on fix :unsure: - had an idea though for a workaround though but dont know how to go about it get the script to get the info nedded from net using firefox and not IE mabie ?

Link to comment
Share on other sites

  • 4 weeks later...

Sorry the test code cause trouble on your system Jon.

I have updated the ticket (in a reply) with new VBS test code that uses www.autoitscript.com instead of the arbitrary site there before and adds a quick and dirty method to insure document load is complete before checking TypeName.

thanks,

Dale

set oIE = CreateObject("InternetExplorer.Application")
oIE.visible = true
oIE.navigate("http://www.autoitscript.com")
MsgBox("Click When Browser Document Load Complete")
MsgBox(TypeName(oIE.document))
Edited 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

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