There are times, we hope rare, when we need to attach an Internet Explorer window where not all of the ready states are complete. Here is an example where the window contains several frames and one of the frames never gets beyond ready state ‘loading’. Watir‘s normal #attach method waits for the overall document to…
Read moreThere are times, we hope rare, when we need to attach an Internet Explorer window where not all of the ready states are complete. Here is an example where the window contains several frames and one of the frames never gets beyond ready state ‘loading’. Watir‘s normal #attach method waits for the overall document to…
Read moreWhen doing automated testing, it’s common to run into a basic authentication window before you can access the application. WATIR can’t handle these authentication windows very well because it’s basically a modal popup with no associated DOM. That’s where AutoIT can be used to handle these authentication windows. You can use AutoIT to send basic…
Read moreIn Part I we moved a dragable element around in the client window. Often the element has a handle that is to be used to move it. Or the handle might be intended for resizing. Of course, we have to find the handle within the element we wish to move or resize. Using the IE…
Read moreIf your test case requires you to validate the text of a modal dialog, you can use the AutoIT function WinGetText.
1 2 3 |
Title = "message from webpage" IEText = ai.WinGetText(Title) puts IEText |
However, this method only works for IE modal popups. When using Firefox, the WinGetText function will output a nil. One possible solution around this is to highlight the text, copy it, send it…
Read moreModal dialogs are pop-ups that need attention before the user can go back to their testing window. Modal dialogs are difficult to automate using only Ruby and Watir because you can’t access the html source code of a modal dialog. Since AutoIT does not require any source code to operate, it is a viable tool…
Read moreAnother useful feature of AutoIt is its ability to manipulate the mouse directly. It makes it possible to grab a window or browser box and move it about or to grab a window handle and move that to re-size it. But before you can move something you have to find out where your target is…
Read moreAutoIT is a powerful tool to use in conjunction with Ruby/Watir because it allows you to manipulate windows and simulate actions without requiring the use of the source code. This is especially useful for pop-ups such as modal dialogs or file downloads.
Read more