Kristoffer Posted March 4, 2010 Share Posted March 4, 2010 Hello, I recently completed some automated test scripts for a webapplication using AutoIT, and all the scripts were working just fine on my machine (using winXP). I installed the same copy of AutoIT on other machines on my development team, and put the AutoIT script I wrote on SVN for other folks to have access to them. The problem is, while most of the script work fine on thier machines, (which is pretty much the same enviroment i'm working on), The AutoIt User Defined Function _IEAttach doesn't seem to be working for anyone else's machine, even though it works fine on mine. Here's my code: #include <IE.au3> AutoItSetOption("WinTitleMatchMode", "2") ;focus on title WinActivate("boboTitle") ;attach to browser $oIE = _IEAttach("boboTitle","Embedded") $oSearchButton = _IEGetObjByName($oIE,"btnSearch") _IEAction($oSearchButton,"click") The error i'm getting is: C:\Program Files\AutoIt3\Include\IE.au3 (3618) : ==> The requested action with this object has failed.: Return $oIE.document.parentwindow Return $oIE.Document^ ERROR and when I run the compiled Executable, I get: Error: the requested action with this object had failed. Any input would be greatly appreciated! Thanks in advanced, and please let me know if there's anymore information i can provide. thanks, KK Link to comment Share on other sites More sharing options...
newcomtd Posted March 8, 2010 Share Posted March 8, 2010 If anyone has any ideas about what would cause this, please post them. I am one of the people whose computer this is not working on. So far, this is what we have tried, without success: 1. Re-installing AutoIT 2. Re-installing Internet Explorer 3. Rebuilding WMI on my machine. Thanks for any consideration. Link to comment Share on other sites More sharing options...
guwguw Posted March 8, 2010 Share Posted March 8, 2010 If anyone has any ideas about what would cause this, please post them. I am one of the people whose computer this is not working on. So far, this is what we have tried, without success:1. Re-installing AutoIT2. Re-installing Internet Explorer3. Rebuilding WMI on my machine.Thanks for any consideration.Did you set IE to be the default web browser?Developers tend to have multiple browsers running, but if IE is not (under Internet Options, Programs, Default Web Browser) the chosen one, your call will fail - at least in my experience it did. Link to comment Share on other sites More sharing options...
newcomtd Posted March 8, 2010 Share Posted March 8, 2010 Did you set IE to be the default web browser?Developers tend to have multiple browsers running, but if IE is not (under Internet Options, Programs, Default Web Browser) the chosen one, your call will fail - at least in my experience it did.Hi,thanks for the suggestion. The box was unchecked, but _IEAttach still fails with the modal window. Link to comment Share on other sites More sharing options...
guwguw Posted March 9, 2010 Share Posted March 9, 2010 The next step I would do would be to verify that IE.au3 is really the same version on all systems (it needs to be in the "include" folder). Have you tried building the script on the computer where it works and then running the *.exe on the other machines? Link to comment Share on other sites More sharing options...
DaleHohm Posted March 9, 2010 Share Posted March 9, 2010 Please add _IEErrorHandlerRegister() to your script to see what additional information you get to the console. 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...
newcomtd Posted March 10, 2010 Share Posted March 10, 2010 Please add _IEErrorHandlerRegister() to your script to see what additional information you get to the console.DaleHere is the console output from the default _IEErrorHandlerRegister() :+>18:38:13 Starting AutoIt3Wrapper v.2.0.0.3 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X64 OS:X86)>Running AU3Check (1.54.19.0) from:C:\Program Files\AutoIt3+>18:38:13 AU3Check ended.rc:0>Running:(3.3.2.0):C:\Program Files\AutoIt3\autoit3.exe "C:\boboPath\boboPage.au3" --> COM Error Encountered in boboPage.au3----> $IEComErrorScriptline = 3618----> $IEComErrorNumberHex = 80020009----> $IEComErrorNumber = -2147352567----> $IEComErrorWinDescription = Access is denied.----> $IEComErrorDescription = Access is denied.----> $IEComErrorSource = ----> $IEComErrorHelpFile = C:\WINDOWS\system32\mshtml.hlp----> $IEComErrorHelpContext = 0----> $IEComErrorLastDllError = 0--> IE.au3 V2.4-0 Warning from function _IEAttach, $_IEStatus_NoMatch--> IE.au3 V2.4-0 Error from function _IEGetObjByName, $_IEStatus_InvalidDataType--> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType+>18:38:14 AutoIT3.exe ended.rc:0+>18:38:15 AutoIt3Wrapper Finished>Exit code: 0 Time: 1.833I have read about other users encountering similar errors but have yet to read about a solution. Also, at the time _IEAttach is called, there are two modal dialogs (Class:InternetExplorer_TridentDlgFrame) open on top of the IEFrame; could this be the cause of the error? Link to comment Share on other sites More sharing options...
DaleHohm Posted March 10, 2010 Share Posted March 10, 2010 The important thing is the "Access Is Denied". This is typically associated with a Cross-Frame Scripting security issue (see my sig). Can't explain why this is different from one machine to another - perhaps your observation about two dialogs is relevant... perhaps you are not attaching to the correct one. 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...
Juvigy Posted March 10, 2010 Share Posted March 10, 2010 Maybe you need to add some site in the Trusted sites zone. That have saved me many times in IE automation errors on other PC's Link to comment Share on other sites More sharing options...
Kristoffer Posted March 10, 2010 Author Share Posted March 10, 2010 Maybe you need to add some site in the Trusted sites zone.That have saved me many times in IE automation errors on other PC'sThanks Juvigy, that solved our problem. Also thanks you dale, your insight on the whole cross-frame stuff did actually help point us into the right direction. Thank you all. What we did was added the domain to our trusted sites, and it all worked out.thanks again, Kristoffer 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