Developers Jos Posted January 30, 2020 Developers Posted January 30, 2020 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
dchriest Posted January 30, 2020 Author Posted January 30, 2020 (edited) . Edited February 16, 2020 by dchriest
dchriest Posted January 30, 2020 Author Posted January 30, 2020 (edited) . Edited February 16, 2020 by dchriest
dchriest Posted January 30, 2020 Author Posted January 30, 2020 Ok, sorry. This can be deleted for I have created it in the Technical Discussion section.
Danp2 Posted January 30, 2020 Posted January 30, 2020 The site uses the jQuery / Angular libraries, so you'll likely need to trigger some additional events to get the site functioning again. You may want to do a forum search on the term "jQuerify" for info on accessing the jQuery object. Latest Webdriver UDF Release Webdriver Wiki FAQs
Moderators JLogan3o13 Posted January 30, 2020 Moderators Posted January 30, 2020 Please stop creating multiple posts "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Moderators JLogan3o13 Posted January 30, 2020 Moderators Posted January 30, 2020 (edited) Moved to the appropriate forum. Moderation Team Edit: Come on! Three Posts in 30 minutes, in three different spots? Really? Edited January 30, 2020 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
ilikecl Posted February 7, 2020 Posted February 7, 2020 Not sure if you figured this out or not. I ran into the same issue, but solved it by making IE the active window, then focusing on the form fields and using Send() to simulate sending in the email and password. Hope that helps.
dchriest Posted February 13, 2020 Author Posted February 13, 2020 (edited) Thanks ilikecl and Danp2 for the suggestions. I will give that a try for I have been unable to figure this out. Edited February 16, 2020 by dchriest
dchriest Posted February 13, 2020 Author Posted February 13, 2020 (edited) I was able to finally able to figure this out. #Include <IE.au3> Call ("SignIn") Sleep (10000);<= delay 10 seconds Call ("SetToHome") Sleep(30000);<= delay 30 seconds Call ("Signout") Sleep (10000);<= delay 10 seconds Call ("Terminate") Func SignIn() Global $oIE = _IECreate("https://webapp.simplisafe.com/#/login") Local $hIE While Not IsHWnd($hIE) $hIE = _IEPropertyGet($oIE, "hwnd") WEnd While Not WinActive($hIE) WinActivate($hIE) WEnd Sleep (3000);<= delay to allow IE to load SS site Send("{TAB 6}");<= tab to email ddress field Sleep (3000);<= delay to allow IE to load SS site Send("YOUR EMAIL ADDRESS");<= enter email address Send("{TAB}");<= tab to password field Sleep (3000);<= delay to allow IE to load SS site Send("YOUR PASSWORD");<= enter in password Sleep (3000);<= delay to allow IE to load SS site clickobjbyclass($oIE, 'ss-standard-button');<= find login button EndFunc Func clickobjbyclass(ByRef $oIE, $class) $tags = $oIE.document.GetElementsByTagName('button');<= get all button classes on page For $tag In $tags $class = $tag.GetAttribute('class') If String($class) = $class Then ;<= looking for ss-standard-button class of the login button Return _IEAction($tag, 'click');<= press login button EndIf Next Return False;<= error out in case the login button is not located EndFunc Func SetToHome() Local $home = _IEGetObjById ($oIE, "home-circle");<= locate the home-circle class _IEAction ($home, "click");<= press Home EndFunc Func SignOut() _IENavigate ($oIE, "https://webapp.simplisafe.com/#/logout");<= logout of account EndFunc Func Terminate() _IEQuit($oIE);<= exit IE Exit EndFunc Edited February 14, 2020 by dchriest
ilikecl Posted February 19, 2020 Posted February 19, 2020 Nice! Unfortunately for me, I needed this to work on a headless server I had, so I ended up compiling a Python script into 2 separate apps that use the SS API for OFF and HOME functions.
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