Automating IE For Testing
Hi, I'm using the InternetExplorer.Application object to automate IE so I can "black box" test a live website.
Usually a required dialog box is designed to protect users. It prevents malicious scripts from: 1) installing IE plug-ins without permissions; 2) change home page, 3) add bookmark, 4) mail email, 5) read cookies that don't belong to your scope. You aren't suppose to bypass them.
Since you test the IE from outside the sand box, did you try to get the message box window handle and to send it a WM_DESTROY?
Windows Scripting Host sendKeys?
Maybe the sendkeys could work. I can get the HWND of the IE window that my script creates.
I've seen freeware or sharaware programs that could send events to windows, based on title and other parameters.
Looks like Rational Test (ex MS Test, ex Visual Test) got the ax after Rational was bought by IBM... Too bad, because it was a neat program to write tests in Basic
Silk test is way better than Visual Test ever was.....
I used to use an automated gui tester that was an internal tool. It was really easy to use and fully scripted for IE, and instead of passing around messages, it actually located buttons on the screen, and provided mouse/keyboard input. Benefit, you rearrange your whole screen it still works, and it actually walks through the GUI like a user would. I can't remember the name of the tool for the life of me. When I get home I'll pull up the name, and maybe you could find it through Google. The only downside was it didn't work with just the rendering engine (i.e. for windows help type features). I think it worked with the activex component though.
"I've seen freeware or sharaware programs that could send events to windows, based on title and other parameters. "
I've done something similar with a few Win32 calls. First, use FindWindowEx to locate the alert box (use Spy++ to figure out the window class if you can't distinguish the window with only the caption). Then use FindWindowEx with the alert box hwnd to find the OK button. Then send the appropriate message to simulate a key press or mouse click (the SendInput API does it).
Fog Creek Home