Quasar Jarosz Posted May 31, 2006 Posted May 31, 2006 This is my first time using IE.au3, so it's possible i'm missing something simple, but here is my issue: First, i'm using IE.au3 version T2.0-0. I'm also using the latest beta of AutoIt, version 3.1.1.125 I have a web page in which i want to click a link. _IELinkClickByText() seems like the perfect solution. Initially i was getting an error saying the link did not exist. After some research i found that my link is actually inside a frame, and that i might want to send the frame object into _IELinkClickByText() instead of the IE object. So i used _IEFrameGetObjByName() in an attempt to get the frame, but that fails with the following error: >Running:(3.1.1.125):C:\Program Files\AutoIt3\beta\autoit3.exe "J:\autoit\src\IETests.au3" J:\autoit\lib\IE.au3 (884) : ==> The requested action with this object has failed.: If IsObj($o_object.document.parentwindow.frames ($s_Name, $i_index)) Then If ^ ERROR The exact code used was: $oFrame = _IEFrameGetObjByName ($oIE, "_svf0") _IELinkClickByText ($oFrame, "Administration - Product",1) I have no idea how to go about figuring out what is wrong here. I have also run into some other problems. I tried to use a piece of code from the IE.au3 help file to step over all frames in my document. The code was: $oFrames = _IEFrameGetCollection ($oIE) $iNumFrames = @extended For $i = 0 to ($iNumFrames - 1) $sFrameSrc = _IEFrameGetCollection ($oIE, $i).src MsgBox(0, "Frame Info", $sFrameSrc) Next However, this did not even pass the syntax checker: >Running AU3Check (1.54.1.1) params: from:C:\Program Files\AutoIt3\beta J:\autoit\src\IETests.au3(65,50) : ERROR: syntax error $sFrameSrc = _IEFrameGetCollection ($oIE, $i). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ So i modified it to work: $oFrames = _IEFrameGetCollection ($oIE) $iNumFrames = @extended For $i = 0 to ($iNumFrames - 1) $sFrameSrca = _IEFrameGetCollection ($oIE, $i) $sFrameSrc = $sFrameSrca.src MsgBox(0, "Frame Info", $sFrameSrc) Next But now i get this: >Running:(3.1.1.125):C:\Program Files\AutoIt3\beta\autoit3.exe "J:\autoit\src\IETests.au3" J:\autoit\src\IETests.au3 (66) : ==> The requested action with this object has failed.: $sFrameSrc = $sFrameSrca.src $sFrameSrc = $sFrameSrca.src^ ERROR In fact, most of the time when i try to use a dot-anything (.<anything>, such as .src, .name, .value, etc) on an object variable, it fails. Usually with the same error as that above: "The requested action with this object has failed." Can someoen point me in the right direction? I have to imagine these are not normal problems - almost every function from IE.au3 i've tried has failed so far! Also, i'm running WinXP SP2 and IE 6.0.2900.2180.xpsp_sp2_gdr.050301-1519 (what a wonderful version number!) Thanks in advance! Quasar
Thatsgreat2345 Posted May 31, 2006 Posted May 31, 2006 Please post this in support and not the Scripts and Scraps you will get help there
Quasar Jarosz Posted May 31, 2006 Author Posted May 31, 2006 Please post this in support and not the Scripts and Scraps you will get help thereAlright. I figured because it was a script and not "general support" this was the right place.I'll repost there.
DaleHohm Posted May 31, 2006 Posted May 31, 2006 Alright. I figured because it was a script and not "general support" this was the right place.I'll repost there.So, my fault. It was a bonehead example. The syntax with .src was invalid, you were with to get an object variable first. The other issue is that the elements of the Frame collection turn out to be window objects instead of frames, so substituting .location.href for .src should work.With this information please do some more testing and then post your troubles in the V3 Support forum.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
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