DaLiMan Posted October 18, 2018 Share Posted October 18, 2018 Hi, I'm trying to click the close button in a website at work. To click the button is not a problem, but then a message comes up to ask [are you sure?] I have to click [OK] but the script keeps waiting for the explorer window. So when i manually click the [OK] button, the script continues. Is there any way to not pause the script and hit the [OK] button automatically? PS: When I start a script with the last 3 lines when the messagebox pops up, it works just fine. Attempt 1 Func _Sluiten_btn() ;--------------------------------------------------------------------- ;Klik op de knop [Nieuw 6.2.1 Accordeer personen] ;--------------------------------------------------------------------- Local $oSearch = _IEGetObjById($oIE, 'close_label') _IEAction($oSearch, "click") ;--------------------------------------------------------------------- EndFunc ;==>_Sluiten_btn Attempt 2 Func _Sluiten_btn() ;--------------------------------------------------------------------- ;Klik op de knop [Nieuw 6.2.1 Accordeer personen] ;--------------------------------------------------------------------- Local $oSearch = _IEGetObjById($oIE, 'close_outer') $oSearch.FireEvent("onclick") ;--------------------------------------------------------------------- EndFunc ;==>_Sluiten_btn Works fine to hit OK, but only in a seperate script?! WinWait("[CLASS:#32770]") WinActivate("[CLASS:#32770]") ControlClick("[CLASS:#32770]", "","[CLASS:Button; INSTANCE:1]") Link to comment Share on other sites More sharing options...
DaLiMan Posted October 18, 2018 Author Share Posted October 18, 2018 Sorry, I see it is in the wrong place. Can someone move this to the 'General help'? Link to comment Share on other sites More sharing options...
Danp2 Posted October 18, 2018 Share Posted October 18, 2018 We just discussed this issue yesterday -- Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
DaLiMan Posted October 19, 2018 Author Share Posted October 19, 2018 OK, didn't find that one. Thanks for the link, I'll look into adlibregister or a seperate script. 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