There are many occasions, using Watir or Watir-Webdriver, when we need to do some testing in one browser window, open another, possibly close it, and return to the first. Watir handles this a bit more transparently than Watir-Webdriver. With Watir you are dealing directly with IE through OLE and IE handles windows and tabs differently…
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 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