0

I want to code some script (language is not a problem), which will open a site in webbrowser or webbrowser control. but the problem I am facing is that some sites have javascript alerts/confirm (ok/cancel) buttons appear during start or if some error occurs. I don't want the user to click these buttons manually, but write some code which clicks these messages. is there any way to do so?

EDIT: I have requirement from a client to create a new desktop application or plugin for browser which will send OK message for all confirm or alerts. Please note that I don't have access to code for these websites user want to visit. Hope this will make it more clear.

Georg Fritzsche
  • 97,545
  • 26
  • 194
  • 236
Kashif
  • 85
  • 8
  • I think really you would be looking at some sort of automated UI tool for this. – James Aug 02 '14 at 07:22
  • It will help u http://stackoverflow.com/questions/10749959/how-can-i-press-the-alert-ok-button-programmatically – Amrendra Aug 02 '14 at 07:24

1 Answers1

1

Depends what are your exact requirements you could check something like Selenium, which is a free and powerful UI automation tool. If you can be bound to exactly one browser, you could maybe take advantage of augmented browsing tools like greasemonkey.

Although I don't know if this satisfies your requirements - I have a feeling that you require this for mobile, since you are mentioning webbrowser control. But I hope it's a good start point for figuring it out further.

the berserker
  • 1,553
  • 3
  • 22
  • 39