watir

Initiate Button click action using Watir Ruby library

Watir::Browser.default = "firefox" ie = Watir::Browser.start("http://cars.com") ie.select_list(:id, 'make_1').set('Chevrolet') ie.select_list(:id, 'model_1').set('Cobalt') ie.select_list(:id, 'pricehighnew').set('No Max') ie.select_list(:id, 'rdnew').set('30 miles') ie.text_field(:name, "zc").set "44109" ie.form(:method, ...

Free tool for automating GUI testing of a Windows Forms application and a Web application

Is there a way to automate GUI testing of a Windows Forms application and a web application (HTML) using free tools? For example, Ruby + Rspec + Watir work great for web UI testing. IronRuby + Rspec can work for winforms apps. Does anybody know a tool that can do both, WinForms and Web? ...

Watir - Logging outside of a method

I'm still fairly new in using Watir for automation testing and I've hit another possibly insanely easy problem that I need to reach out to the community for a little bump in the right direction. I'm trying to use logger in Watir, which I can get to work fine if I keep everything within methods. If I don't have a method defined, for ins...

how to update watir?

i am getting error while truing to install watir C:>gem install watir ERROR: http://rubygems.org/ does not appear to be a repository ERROR: Could not find a valid gem 'watir' (>= 0) in any repository C:>gem -v 1.3.7 C:>ruby -v ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32] ...

How to remove all non - ASCII characters from a string in Ruby

Hi, I seems to be a very simple and much needed method. I need to remove all non ASCII characters from a string. e.g © etc. See the following example. #coding: utf-8 s = " Hello this a mixed string © that I made." puts s.encoding puts s.encode output: UTF-8 Hello this a mixed str ing ┬⌐ that I made. When I feed this to Watir, i...

Problem between IE and FF testing a login

This is so simple that I am stunned it is failing. I am testing a very simply login sequence and essentially my code does this: require "watir" user = "[email protected]" pswd = "qwerty" br = Watir::Browser.new br.goto("http://mysite.com") br.link(:id,"login-menu").click # click the login menu br.text_field(:id,"l...

Has anyone managed to get Watir using IE on Ruby 1.9.1 working ?

Hi, I'm new to ruby and am having trouble getting a simple watir script to work with IE on ruby v1.9.1. I can get it to work with ruby v1.8.6 Has anyone managed to use watir with Ruby v1.9.1 ? This is the script i'm using require 'watir' browser = Watir::Browser.new browser.goto 'http://www.ruby-lang.org/' Below are details of ...

Which Ruby Version for Watir on Windows?

What version of Ruby should I be using on a windows environment? I'm trying to use Watir on 1.9 and it does not work. Will work on 1.8.6. Any recomendations on which version to use and reasons why Watir does not work on 1.9 ...

how to access this element

I am using Watir to write some tests for a web application. I need to get the text 'Bishop' from the HTML below but can't figure out how to do it. <div id="dnn_ctr353_Main_ctl00_ctl00_ctl00_ctl07_Field_048b9dfa-bc64-42e4-8bd5-b45385e5f45b_view" style="display: block;"> <div class="workprolabel wpFieldLabel"> <span title="Please s...

Watir: Can I tunnel through an *External* HTTP/SOCKS proxy over Firefox?

I would like to know if I can invoke watir and have it tunnel through a proxy. And If i can change this proxy at runtime and also if I can set the proxy for each instance (when runnnig multiple instances/tests). I pretty much intend to use firefox. ...

If I start anew, should I start with Watir-WebDriver?

My team has an automation solution that uses watir. In fact, we have 2 versions of it, one for one release of our software and another for another release. I find that changing versions of watir used it not easy, so I want to select the right version for my new project (building an exploratory framework like Jim Knowlton talks about on W...

How to access each element of several tables ?

Hi everyone, I'm current writing a test script for our MLS( Multiple Listing System ) systems. The website is mainly written in C# .NET. Here is the screenshot that I got: http://i235.photobucket.com/albums/ee62/rox_rook/Ex-1.gif And this is the HTML source: > <TABLE style="BORDER-RIGHT-WIDTH: 0px; > BORDER-TOP-WIDTH: 0px; > BORDER-B...

How to make a tab expend?

Hi everyone, Here is the website I want to try out. http://www.csun.edu/ Under myNorthRidge Portal, there is a place for me to fill out my user id and password. But the thing is that I have to click on the "sign" to expand the tab first. I could not find a way to get around this problem :( ? Anyone could share me a hint how to solve th...

Trouble find elements with fireWatir on a JQuery created page

I am having a problem identifying a label on a jQuery generated page. This is the code of the page (as seen in firebug). I am trying to find it using this statement, assert(browser.label(:id, "acms-ws-select-label").exists?) Put it fails to find the label. Any ideas on what I am doing wrong? Update: running the same script in IE wi...

Set text field value instantly (without emulated typing)

Hi all, I'm using the below command to set a text input value to "some value" however the value isn't set instantly, instead it's set as if it were typed by a user. That's ok for small values, but I'm using this method to insert a big text inside a textarea and I don't want the emulated typing to occur, I would like the value to be set ...

How to Block images in watir ?

I am watir for some data fetching job and I dont really require any images to loaded. So I was wondering if it is possible since I want to speed up the process. ...

WATIR/ FireWATIR URL consistency?

We are at the start of a project to test a new web application written in jQuery and are planning to do it using WATIR and FireWATIR. During the proof of concepts test I've discovered differences in how WATIR and FireWATIR represent URLs, for example a script which passes in FireWATIR generates this error in WATIR. assert_equal(expandI...

Watir: How to access a table without an ID or NAME.

I am trying to write my watir script to grab the following data (the table body headers and the table row data, but I am having trouble trying to figure out how to access the table. (Once I get that, teh rest is a piece of cake). Can anyone come up with something that will help me access the table? It doesn't have a name or an ID... <...

Does Watir recognize META HTML element?

Hi for SEO purpose we need to access META tags on the html pages. But Watir does not to support META tag. Is there any other way to access not supported HTML tags? Any help appreciated. Hi I found the way to access the elemnts by using getElementsTagByName b.document.getElementsByTagName('meta')[1].content test.rb:14:in `[]': can't con...

Watir magic escape sequence?

I am currently using Watir with Firefox and it seems that when I try to set a field with the following text: !@#$QWER7890uiop The command I am using is the following: text_field(:name, "password").value=("!@#$QWER7890uiop) I've also tried this: text_field(:name, "password").set "!@#$QWER7890uiop) Only the first 2 charac...