I’m very new to Eggplant and trying to get my first real test scripts running and i’ve had mixed results. It seems that the script that runs works, but only sometimes. One particular bug that i’ve run into is that in the middle of a running script, while performing a WaitFor command (at least I think this is when it occurs the most), the browser window will minimize all of a sudden and therefore will fail the rest of the test because it can not find the next image it needs to. Here’s a sample of the script i’m running:
TypeText WindowsKey, "r"
WaitFor 50, WebsiteDoneLoading
WaitFor 50, ToolsMenu
WaitFor 10, InternetOptionsMenu
WaitFor 10, BrowsingHistoryLogo
WaitFor 10, DeleteAllButton
Obviously this doesn’t really help without knowing what the images are that the names are referring to, but basically what i’m trying to do is open internet explorer, wait for it to be done loading (btw, is there a command or something for that to make it easier to determine when a page is done loading?) and then click on the Tools menu and “Internet Options” menu and delete the browsing history (I do this so that I can start with a fresh cache everytime the script runs).
Anyway, it seems that SOMETIMES, this will work without a hitch, but other times especially when running on another VM, when it gets to the step of Clicking on “Internet Options” it appears to click the menu item and then the browser window minimizes and so the rest of the script fails.
This is running in Windows 7 64 bit with SP1 btw. Currently testing with IE8. Any ideas? Thanks in advance.
An image search can involve several sweeps of screen while the SUT processes events. When eggPlant doesn’t find an image on the first sweep of the screen, it moves the mouse to the lower-right corner of the screen in case the mouse cursor is interfering with the match. This is a holdover from when VNC servers included the mouse as part of the screen updates; most modern servers use “rich cursors” where the cursor image is drawn in on the viewer side, but we’ve kept the old behavior for backwards compatibility with scripts that may rely on it.
This is relevant because in Windows 7, Microsoft introduced the Aero Peek feature. This feature is triggered by moving the mouse to the lower-right corner of the screen, and it hides all the windows and shows the desktop. This is an unfortunate collision between our existing behavior and their new one. There are several solutions:
You can disable Aero Peek. Right click on the lower-right corner of the SUT screen and select “Show Desktop”. This turns off the automatic window hiding and requires you to click in that area to show the desktop.
You can turn off the mouse repositioning in eggPlant. This can be done by changing the setting in Preferences > Run Options > Mouse > “Should reposition mouse during image search”. This setting can usually be disabled without any side effects, especially for new users. It can also be disabled in a script with the code:
set the shouldRepositionMouse to false
Another option is to change the point to which the mouse is repositioned so that it doesn’t fall in the area that triggers the Aero Peek feature. This can be done in code as well:
setOption RepositionPoint, (-3,-41)
(Negative values are relative to the lower-right corner; this example assumes a Task bar that is just a single row in height.)
Thank you for the quick reply! I had noticed that mouse moving to the lower right corner thing before and was wondering about it. Glad to know i wasn’t just imagining it :). I had actually tried disabling the Aero Peek option already and that’s how I was able to sometimes get it to work and sometimes not i think. However, your suggestion about disabling the mouse move in the preferences seems to have stopped the minimizing issues for now I believe, so thank you!