Code: Select all
ieVisible := True
ie := ComObjCreate("InternetExplorer.Application")
ie.visible := ieVisible ; Show Internet Explorer window?
ie.ToolBar := false
ie.Navigate("https://cgcookie.com/login")
; wait for the browser to load
while (ie.ReadyState != 4 or ie.Document.ReadyState != "complete" or ie.busy)
{
sleep 100
}
ie.document.GetElementById("user-email").value := "me@myselfandi.com"
ie.document.GetElementById("user-password").value := "ABCDEF"
ie.document.GetElementsByClassName("btn btn-primary btn btn-primary btn-lg btn-block")[0].click()
Additionally, the .focus, .onchange(), and .fireEvent() don't seem to have an effect.
Code: Select all
ie.document.GetElementById("user-email").focus
ie.document.GetElementById("user-email").onchange()
;ie.document.GetElementById("user-email").fireEvent("onchange")
Code: Select all
sleep 1000
send me@myselfandi.com{Enter}
sleep 1000
send ABCDEF{Enter}
Update 1:
I believe these input fields could be connected to some event handlers.
Update 2:
It looks like there are JQuery event listeners.
I also watched @Joe Glines video ( https://www.youtube.com/watch?v=v6vD_Pzy7AM ). I got a better understanding but not enough to solve this challenge.