watir

Do you use WaTiR?

Is there a better unit testing tool than WaTiR (tag) for Ruby web testing? Or is the defacto standard? What unit testing tools do you use? ...

How do I configure IE7 to download filetype instead of opening in browser

I have written a watir script that downloads files. One of the files it downloads has a .dcf extension. Months ago, on my machine, I changed a setting somewhere so that .dcf files prompt for download ("Do you want to open or save this file?") instead of opening in the browser. This is the behavior that I desire. I am using XP Pro/IE7. ...

automated testing with Watir (or WatiN or similar): Disambiguating Select Elements

Problem: I am looking for a way to run a test that is able to disambiguate between select controls that have the same value in more than one place. Example: I am trying to choose the third "monday" from a select control ie.select_list( :id , 'choose-day' ).set( '-monday' ); where the select control has a kind of "outline" format in...

performance testing tool

Hi All, We are using watir and integrated with VS 2008 using ruby in steel and we have automated our web application and it awsome. Is there way to use the same script to do the performance testing or is there any better tool. ...

Is it possible to navigate back in browser with watir?

hi, I'm creating an automated tests that should navigate back a few steps. Is it possible to do so in Watir?? I'm navigating to a resultlist page and want to go back to the start of my test just by clicking back (windows browser). Thnx ...

autocomplete dropdown test with ruby (watir).

Hi, i'm trying to create watir test that fills inn a textfield by writing feks "lon" and waiting till the dropdown is triggered and then clicking on the first element in the list. Writing "lon" should trigger many options like "London, England, Storbritannia", London, Kentucky, USA and etc. Is it somehow possible to this with watir??...

Watir vs Selenium vs Sahi

Out of these 3, which have you or has your company chosen to work with? Pros & Cons please. I'll be comparing them myself as well, but I'd like to hear what others have to say. Also, please state which you have all tried (so that I know you have a good comparison of the 3). ...

How to implement Watir classes (e.g. PageContainer)?

I'm writing a sample test with Watir where I navigate around a site with the IE class, issue queries, etc.. That works perfectly. I want to continue by using PageContainer's methods on the last page I landed on. For instance, using its HTML method on that page. Now I'm new to Ruby and just started learning it for Watir. I tried asking...

Is there a way to update RubyGems offline?

I am trying to install Ruby + WATIR to a Windows server which is in an isolated environment. Typically I would run the ruby installer followed by these two commands: 1) gem update --system 2) gem install watir This is as per the instuctions here The server I am now trying to install to does not have internet connectivity. This caus...

WatiN test data reset/clean up

I'm wondering how people are currently resetting their data / cleaning up test remnants for their WatiN/Wartir tests? For example, lets say there's a test to add a user into the system and the username has to be unique. Obviously the first run without any users should work fine, but the second run will fail without manual intervention. ...

Get COM object for embedded IE browser with ruby win32api

Alright this is a pretty complicated problem but it looks like the hard work has been done already by the autoit IE.au3 project. So now it just takes someone experienced with ruby and win32api, and possibly autoit as well to figure out how to translate a function written in IE.au3 to ruby. The end result is I want to use Watir with an em...

Sanity Check with XPath in Ruby Watir

I'm using the Ruby Watir library to do automated testing for a client and I'm having issues with the XPath selector. I think I just need another set of eyes to let me know if I'm just missing something. Here is the selector I'm using: puts ie.cell(:xpath, "//img[@src='3.jpg']/../").text For this set of tables, it works as expected ...

Watir does not trigger Jquery event handler

I am testing a JQuery Web application. I have a JQuery popup that I simply cannot get the submit button to fire in Watir. The same pattern is used thought the application. I have verified the button exists and have tried click, fireEvent you name it and am out of methods to call. Has anyone solved this? ...

Watir image processing

Is there a way to get an image extension (based on the content-type header) and it's body in Watir? Here is an example require 'watir' zz = Watir::IE.new zz.goto('http://flickr.com') image = zz.image(:src => %r/l.yimg.com\/g\/images\//) puts image I need to get extension and the contents (base64encoded or just location of a temp fil...

[Ruby] open-uri + hpricot & nokogiri don't parse html correctly

I'm trying to parse a webpage using open-uri + hpricot but it seems to be a problem in the parsing proccess as the gems don't bring me the things I want. Specifically I want to get this div (whose id is 'pasajes') in this url: http://www.despegar.com.ar I write this code: require 'nokogiri' require 'hpricot' require 'open-uri' docu...

How to login on the site with JavaScript in Ruby on Rails?

Please help me. This what I have written require "watir" site_url = "http://vkontakte.ru" ie = Watir::IE.new ie.goto site_url ie.text_field(:name, "email").set "[email protected]" ie.text_field(:name, "pass").set "zothrf" I need to login on vkontakte.ru. I don't know how to do that with Javascript. Here the code from the main pa...

Watir not working in Windows 7

I recently did a fresh install of Windows 7. I installed Ruby 1.8.6 and Watir via RubyGems. When I try to run a Watir script, IE opens and the first page is called, but the problem seems to be that the script doesn't wait for the page to finish loading (which it's always done in the past). Subsequent lines in the script try to access ...

Get Elements By Attributes

Hi people, i will be short. As far as i know watir library provides two methods for getting html elements. Almost for each element (div, button, table, li, etc) watir provides two methods: . One is the 'singular' method which gets only one specific element. For example: watir_instance.div(:id,'my_div_id') watir_instance.link(:href,'m...

How can I get value of element custom attribute with Watir

I have HTML that looks like this: <input custom_attribute="so cool" type="text" /> I would like to get value of custom_attribute using Watir. ...

Firefox JSSH Connection or very detailed compile steps on Ubuntu 64?

Hi there, I'm having a hard time getting jssh and firefox to play nice on an Ubuntu Jaunty 64-bit machine. Anyone know the specific steps needed to make this work? (or, if you're using something else to get firewatir to work, I'll take those as answers as well) Here are a few things I tried: installing the jssh extension by itself (by...