The Watir problem with waiting for Ajax elements… When testing a webpage that contain elements like Javascript or ajax which, after an event fire, reload page elements without reloading the whole page can become difficult to script for using plain Watir or Selenium. For example, Watir’s wait_until method will wait for an element to…
Read moreIn one of our clients current projects, there is a module of scripts that require each script to log in as multiple user/roles to complete certain parts of the work flow. The application is also a little quirky. It has no log out button! So in order for our script to log out of one…
Read moreParsing .PDF’s with Ruby In our journey through the world of test automation with ruby we have found that sometimes the data we need to validate is locked up in some .pdf formatted file and can be difficult to get at. The 3Qi Labs team decided there had to be a way to automate…
Read morePopulation of select lists are often linked to the values of other entries on a page. Here is an example where the first field (text field) entry is used to do a search which populates the second field (select list) on hitting ‘Enter’. Selection of an option from that list populates the third field (also…
Read moreThe web testing is not limited to just clicking few links and checking if the controls are working fine. In my job, we do a lot more than that. In one of the recent requirements I got on one of our projects, I had to setup an email notification based on an event. This blog…
Read moreThis blog outlines how to do scripting for test cases that involve editing of word documents or verification of the contents of a word document. The script would need to have:
1 |
require 'win32ole' |
To open an MS word document:
1 2 |
@word = WIN32OLE.new('Word.Application') document = @word.Documents.Open('C:HelloWorld.docx') |
The Range(x,y) specifies the place at which text will be inserted. “.Text” allows to insert text…
Read moreOur Customers typically have 4-7 “lower” environments where the underlying application is deployed and tested, multiple times by multiple teams before making it into “production”. One of the big benefits of using Awetest is the ability to create and test new environments on the fly using existing scripts. When an automation script is written, it…
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 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 moreI have been working on Ruby and Watir technologies for a while now. While enjoying the versatility of Watir (as evident from Željko Filipin’s Watir solution for playing pacman, http://zeljkofilipin.com/2010/05/29/play-google-pacman-with-watir/) – I realized that there are certain scenarios in which we do not have direct method for accomplishing a task. For example, when we have…
Read more