In 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 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 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 moreMentioned in an earlier post, roo is a great gem to use with watir to do excel validations. You can use roo to find values in specific cells or within a range of cells. Naturally, you would want to do your data analysis across a range of cells to avoid unnecessary work and lines of…
Read moreMentioned in an earlier post, roo is a great gem to use with watir to do excel validations. You can use roo to find values in specific cells or within a range of cells. Naturally, you would want to do your data analysis across a range of cells to avoid unnecessary work and lines of…
Read more