Checking a checkbox that is inside an iFrame

Recommended Posts

Hi guys, I need help as I have worked for more than 18 hours in trying to get this resolved but couldn't. There's a registration page that has an iframe and I need to put a check on the checkbox inside that iframe. The iframe's content is pointing to external source.

Could anybody please share a complete simple _IE code to put a check on any of the checkbox in that page so I can analyze it and post my solution here? I am having trouble understanding the syntax of AutoIt. I tried this for hours and couldn't get it to work. The checkbox ID is showing as NOMATCH in AutoIt error report so I thought I had to reference the iFrame first but the iFrame too shows as NOMATCH when they are both sitting there.

Sign in

Similar Content

If you press the "Login" button in the top-left of https://www.showroom-live.com/, it creates a popup in which you press "Login with Twitter ID", which then opens a new window with an "Authorize app" button.
None of these 3 buttons have a Name or ID, so how do I click on them, because _IEGetObjByName / _IEGetObjByID will not work.
Here are the sources of the 3 buttons:
;Login button.
;<a onclick="showLoginDialog();" href="javascript:void(0);">Login</a>
;Twitter button (Note that I am already signed into Twitter and just need to Authorize it).
;<a class="btn-twitter btn-sky-blue submit fs-b5" onclick="window.open('/social/twitter/redirect_authorize_url?login=1&from_browser=1', 'twitter', 'width=500,height=400,menubar=yes,status=yes,scrollbars=yes');" href="javascript:void(0);">Login with Twitter ID</a>
;Popup window appears.
;<input class="submit button selected" id="allow" type="submit" value="Authorize app">
I have also tried:
Local $oLinks = _IETagNameGetCollection($ie, "a")
For $oLink In $oLinks
If $oLink.InnerText = "showLoginDialog()" Then
_IEAction($oLink, "Click")
ExitLoop
EndIf
Next
I've even tried adding "showLoginDialog()" and "javascript:void(0)" to the end of the URL, but as expected, that wouldn't work either.
My goal is something like this:
#include <IE.au3>
Local $ie = _IECreate("https://www.showroom-live.com/onlive")
_IELoadWait($ie)
Local $originalHandle = $ie
;===Functions==========================================================
Func login()
;Source: <a onclick="showLoginDialog();" href="javascript:void(0);">Login</a>
_IEAction(ABOVESOURCE, "Click")
;Source: <a class="btn-twitter btn-sky-blue submit fs-b5" onclick="window.open('/social/twitter/redirect_authorize_url?login=1&amp;from_browser=1', 'twitter', 'width=500,height=400,menubar=yes,status=yes,scrollbars=yes');" href="javascript:void(0);">Login with Twitter ID</a>
_IEAction(ABOVESOURCE, "Click")
;New window appears for Twitter sign in, but the URL is locked.
;Source: <input class="submit button selected" id="allow" type="submit" value="Authorize app">
_IEAttach($ie, ABOVEHANDLE) ;How do I get the handle of the new window from above?
_IEAction(ABOVESOURCE, "Click")
_IEAttach($ie, $originalHandle)
EndFunc
;======================================================================
;===Code===============================================================
login()
;======================================================================
Thank you in advance.

Hi guys!
I'm looking for your help
The problem is: when I got the iFrame object at the page's source code, the return was "ok", but when I tryed to pick the iFrame's source code, the result is "nothing". Even use the _IETagNameAllGetCollection and others similar functions the result is the same: "nothing"