Jewtus Posted October 6, 2014 Share Posted October 6, 2014 I've been struggling with this for some time now, but I'm trying to figure out how to bind to some objects in a secure web form. Here is a screenshot of the HTML: and this is my code: $oIE = _IECreate($URL) $frame = _IEFrameGetCollection($oIE) $navframe = _IEGetObjByName($frame,"__nav__") $test1= _IEFrameGetCollection($navframe) $test2 = _IEGetObjByName($test1,"auth") Everything seems fine up until $test2. The @extend value of $test1 is 2, so there are definitely elements in there, but when I try GetObjectBy name or ByID, I always get the return error 7 (no match). Anyone have any idea what I'm doing wrong here? Link to comment Share on other sites More sharing options...
Solution Danp2 Posted October 6, 2014 Solution Share Posted October 6, 2014 _IEFrameGetCollection returns a collection of objects unless you pass the 2nd parameter indicating the desired instance. Also, don't confuse an element's name with its ID. The highlighted div element has no name, but it's ID is "auth". Try this: $oIE = _IECreate($URL) $frame = _IEFrameGetCollection($oIE, 1) $authdiv = _IEGetObjById($frame,"auth") Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Jewtus Posted October 6, 2014 Author Share Posted October 6, 2014 _IEFrameGetCollection returns a collection of objects unless you pass the 2nd parameter indicating the desired instance. Also, don't confuse an element's name with its ID. The highlighted div element has no name, but it's ID is "auth". Try this: $oIE = _IECreate($URL) $frame = _IEFrameGetCollection($oIE, 1) $authdiv = _IEGetObjById($frame,"auth") That did it!! Thanks! 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