oemript Posted April 7, 2018 Share Posted April 7, 2018 (edited) I would like to know on how to set sleep based on following conditions Task 1 - open $oIE1 and close it after 5 seconds Task 2 after 2 seconds of Task 1 - open $oIE2 and close it after 5 seconds Results show be Task 1 run at 12:02:00 am to open $oIE1 and close at 12:02:05 Task 2 run at 12:02:02 am to open $oIE2 and close at 12:02:07 #include <IE.au3> Local $oIE1 = _IECreate("http://www.google.com") WinSetState(_IEPropertyGet($oIE, "title"), "", @SW_MAXIMIZE) Sleep(5000) ' After IE1 is opened, close it after 5 seconds, but it would hold the rest of process too. _IEQuit($oIE1) Sleep(2000) ' waiting 2 seconds, would it totally hold 7 seconds before processing following task? Local $oIE2 = _IECreate("http://www.google.com") WinSetState(_IEPropertyGet($oIE, "title"), "", @SW_MAXIMIZE) Sleep(5000) ' After IE1 is opened, close it after 5 seconds _IEQuit($oIE2) Does anyone have any suggestions? Thanks in advance for any suggestions Edited April 7, 2018 by oemript Link to comment Share on other sites More sharing options...
Danp2 Posted April 7, 2018 Share Posted April 7, 2018 Search for "timer" in the help file. oemript 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
oemript Posted April 11, 2018 Author Share Posted April 11, 2018 Thank you very much for suggestions (^v^) 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