watir

Does Watir work under ruby 1.9.1?

Here is the .rb program: require 'watir' b = Watir::Browser.new the 2nd line will trigger a ""The program can't start because msvcrt-ruby18.dll is missing from your computer!" error. I am using 1.9.1p378 on win32 ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32] How can I fix this? Thanks for your attention. ...

xvfb on a machine with a display, can an application run 'in the background?'

I'm setting up to cron a web scraping job, using xvfb, firefox, and watir on my Mac OS X. In testing the script so far, firefox pops up visibly on the local desktop, the watir script executes, and then firefox exits (I quit firefox in my script). I'd like to set the xvfb DISPLAY such that firefox will run, but won't be seen on the loca...

Can AutoIt scripts run as a scheduled task while not logged in?

I am using Ruby/WATIR/AutoIt to automate a task via Task Scheduler which runs fine as long as I am logged in, but as soon as my account is locked (mandated 10 minute screen lock) or I logout the script stops functioning. When I log back in, it is sitting at the part where AutoIt is supposed to handle a file download dialogue by clicking...

error when to attach to a new window

I'm trying to figure out the best way to attach to a new browser. I've been successful using the following: browser.attach(:title, "title") I was reading over at the wtr-development group that the preferred way to do it is like this: browser.attach(:title=>"title") This syntax seems to work for all other other elements, except for th...

Testing drag-and-drop with Watir

I'm evaluating Watir right now. While Selenium has a dragAndDropToObject command (which seems to be broken) Watir seems not to have such a command. I couldn't find a script/tutorial with an example of how to test DnD with Watir. Did anybody try/succeed in testing drag-and-drop with Watir? Btw.: I am using jQuery for the DnD implementat...

How to explicitly add a cookie in Watir?

I need to set a cookie in IE to execute some specific flow. I tried using the following code ieb = Watir::IE.new ieb.document.cookie="rememberme=foobar;Path=/; Domain=sometestdomain.com" # Bring up browser and do bunch of stuff However, I see that when the IE comes up, rememberme cookie is not set. Am I doing something wrong here? ...

Using watir attach the embeded browser in an eclipse RIA

I just want to let watir attach embedded browser, and control it. I find this topic: http://groups.google.com/group/watir-general/browse_thread/thread/479... and read all that reference. It seems someone has solved this problem. But I can't let it work yet. I can't understand all those details. My problem is as following: In an Eclips...

blacklist test requests from google analytics using watir

Hi, I have to automate tests for a web application which runs google analytics script. I have chosen watir for the automation since I can script all the test cases with the same. The only problem is i dont know how to remove my test requests to the web apps from the google analytics report. Can anyone help me with the same? Is it possi...

Watir and Cucumber unable to run on win xp

I just download an example of cucumber from http://github.com/aslakhellesoy/cucumber/downloads, and install ruby, watir and cucumber. but I dont know how to run it, I cant found any example for windows. thanks, Dani. ...

Watir question regarding select_list and reloading

I have a drop down with multiple options. Whenever you choose an option, the page reloads with data specific with that option. Currently I'm using select.list(:name, strg).set(value) and it does that part just fine, but it does not reload the page with the specific data. Anyone know how to help. When i watch it in action, it doesn't ...

How to build a test group in watir?

I have some single watir.rb scripts that use IE and are written in a standard watir way. How do I create a test group that combines them? I want all of them be executed by executing the main script. Is it possible to auto include single test files into a test group by subidr? Is it possible to enumerate the files that should be includ...

Integration Testing an Entire *Existing* Application (w/ automatic execution of test suite)

Hi there, I have just joined a team working on an existing Java web app. I have been tasked with creating an automated integration test suite that should run when developers commit to our continuous integration server (TeamCity), which automatically deploys to our staging server - so really the tests will be run against our staging web ...

Watir changes highline's "ask" method

Hello! I've encoutered some strange functionality, when using Watir and Highline together. Here is simple example: require 'highline/import' comp = ask("Company? ") { |q| q.default = "MySuperCompany" } puts comp require 'watir' comp = ask("Company? ") { |q| q.default = "MySuperCompany" } puts comp Here is an output: Company? |M...

Watir question regarding table rows and loop

Hi, I would like to go through a table and look for a word, if that word appears, i would like to click on a radio button in the same row, but not the same column, then stop the loop. I have something like this at the moment but i dont know where to go on from here. @ie.div(:class, 'tableclass').table(:index, 1).each do | row | r...

Watir question regarding selecting a hidden dropdown.

Hi, I have two dropdowns, the second dropdown does not show until a choice is made from the first one. Using watir, i can select the first dropdown, and when i watch it, the second one becomes active, but it cannot select it. i just tried the regular select_list using name and id. Here is the code for the second drop down. <td> <input t...

How do I route watir through a proxy pragmatically?

I'm trying to route watir through a proxy pragmatically -- this means within the script I'd like to change my proxy dynamically before launching the browser. Here's what I've tried so far (and so far am failing): I'm running chrome and lucid lynx ubuntu. I chose TREX cause I thought watir might be making use of PROXY or something. I re...

How to find a particular table cell in Watir

Using Watir to regression test some changes: I want to 'click' a row in a typical old style web page menu, where the menu is a table of tables. In this particular example, the table cell contains the menu item, and the row, which only consists of the one cell, has an onclick handler. I thought I could cell = browser.element_by_xpath("...

IE browser doesn't close and file download popup needs focus

Hii all , I am trying to to click on a link after it is active which again produces a popup ( file download) after clicking. Here i have 2 problems 1) I start the code and leave it .what the code does is -after long process -it waits for the link to be active .Once the link is active it clicks on the link and a download popups opens (i...

Automating Web Access and Watir

I'm building a Ruby program that uses several other programs, and while most of them are programs I can download and run on this computer, one has to be accessed and run through a web browser. I actually have two questions: I've found Watir which looks like a good web automation tool, but it's meant for testing. Is it still okay to use ...

Ruby/Watir - Formatting print from an array

I'm using Watir to do some automated testing for a website. This particular test I'm pulling an array of sku numbers from an Excel sheet and then randomly selecting one from the array to use as my test. The number is placed into a search field and it pulls back my product. Here's my problem: I'm pulling the data from Excel and I pri...