Trying to select the OK button or X on a Window Alert using VBScript

  • Thread starter Thread starter LDub24
  • Start date Start date
L

LDub24

Guest
So I'm trying to automate a login to a webpage that has a basic "Window.Alert("Message")" in the HTML that pops up immediately upon navigation. I'll be running the VBScript through Task Scheduler so I can't use SendKeys.

The only solution I've come across so far is to use IE.document.all(#).Click and using the HTML Element # but I haven't had any luck so far. I don't know if I've been using the wrong Element Number or if the Window Alert isn't actually an HTML Element (I don't know if it matters but it is in a <SCRIPT Language="JavaScript" > tag).

I've scoured dozens of search pages with tons of different searches and I can't find anything. Please let me know if you have any possible solutions.

Continue reading...
 
Back
Top