Sign in to follow this  
Followers 0

IE9 Automation Problems

101 posts in this topic

#1 ·  Posted

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

Share this post


Link to post
Share on other sites



#2 ·  Posted

It would appear that _IETagNameGetCollection is working in some cases, but not in others. I also just found that _IEAction is also working in some cases, but not in others.

More to come...

Share this post


Link to post
Share on other sites

#3 ·  Posted

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#5 ·  Posted

Anyone else having this problem? It's been quiet since uploading my sample code. My scripts are working perfectly (right now, as a matter of fact) on my computer with IE8.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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:

UDFs:
Active Directory (2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (NEW 2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

Share this post


Link to post
Share on other sites

#8 ·  Posted

@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

Share this post


Link to post
Share on other sites

#9 ·  Posted

:)

My UDFs and Tutorials:

UDFs:
Active Directory (2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (NEW 2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

Share this post


Link to post
Share on other sites

#10 ·  Posted

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!

Share this post


Link to post
Share on other sites

#11 ·  Posted

Dale,

I realize you likely have higher priorities than this, but have you made any progress?

Kevin

Share this post


Link to post
Share on other sites

#12 ·  Posted

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

Share this post


Link to post
Share on other sites

#13 ·  Posted

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!

Share this post


Link to post
Share on other sites

#14 ·  Posted

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.

Share this post


Link to post
Share on other sites

#15 ·  Posted

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

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#17 ·  Posted

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

Share this post


Link to post
Share on other sites

#18 ·  Posted

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 ?

Share this post


Link to post
Share on other sites

#19 ·  Posted

I had a look at this ticket, but the vbs code given sent my machine into such a crash loop that I need to reboot to recover. So I'm not sure it's an AutoIt bug?


"If you can post in the forum, that there is an issue with the forum, then the forum is working spectacularly. All else is cosmetics, and can totally suck it."
- boththose, April 2015.

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0