Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [watir]

Watir, pronounced "water", is an acronym standing for "Web Application Testing in Ruby". Watir is a toolkit used to automate browser-based tests during web application development. It uses the Ruby scripting language to drive Internet Explorer, Mozilla Firefox, Google Chrome, Opera and Safari, and is available as a RubyGems gem.

0
votes
0answers
27 views

Tool to record WATIR scripts?

I need a tool to record browser action and generate WATIR scripts. Is there any tool available for this?
0
votes
1answer
180 views
2
votes
0answers
24 views

How to select a file from hard disk using watir ruby on MAC OS [closed]

How to select a file from hard disk using watir ruby on MAC OS Can any one send me the sample watir ruby code to select a file from hard disk or local system using watir ruby on MAC OS
3
votes
2answers
296 views

How do I configure my env.rb file to be able to switch browsers?

Currently, here is part of my configuration with testing using Chrome: prefs = { 'download' => { 'default_directory' => "#{$myRoot}/PDF", 'prompt_for_download' => ...
2
votes
2answers
1k views

What are the differences between capybara and watir

I've used capybara for a while, now I see watir is another possibility for writing web automation. Both are ruby based and use selenium. Other than syntax differences, are there significant ...
4
votes
1answer
397 views

Watir can't locate an element with xpath [closed]

I got this html (It's simplified to see the deep) <html> <frameset> <frame> #document <html> <body> ...
2
votes
2answers
621 views

Watir can't click on an element but can on irb

I have this command: @browser.element(:xpath => "/html/body/app/pages/div/div/div/div[3]/mi-perfil/div/div[3]/datos-personales/div/div[1]/span[2]").click There is no problem with the direction of ...
0
votes
2answers
1k views

How to click on a link with dynamic href with cucumber watir?

The title is my question. I have a link like this: <a href="http://192.168.0.199/api/users/confirm-register/86fd8faa8fc23a2c4c5203fae252c3d02458093f"> http://192.168.0.199/api/ <wbr> ...
1
vote
1answer
658 views

What's the difference between using Python vs. Ruby for Browser Automation testing? [closed]

I want to automate test cases on web browsers and I love the concept of Python's Salad (mix of Lettuce (BDD) and Splinter (browser automation)). But I've heard that Salad might not be the most stable,...
7
votes
3answers
379 views

Structuring Selenium tests to avoid duplication

I'm refactoring our test suite to take advantage of page object pattern. I'm missing how to structure the actual tests. Lets say that I want to test StackOverflow posting and deleting. Once scenario ...
2
votes
1answer
2k views

Wait until the text-field values are fetched through API in Watir-WebDriver

I am writing the registration script where the API is being called in company registration no field and it fetches all the data regarding company and fill it automatically in according field like name,...
1
vote
2answers
262 views

Validate worksheet name using WATiR

How to validate the worksheet name / file name of Excel and CSV files in WATiR? Because if we save the CSV file in with different name, the worksheet name will also change while in Excel it will ...
2
votes
2answers
1k views

Include Watir test cases in a Continuous Integration system

Did anyone succeed deploying Watir test cases to a continuous integration system such as Team City or Hudson? I'm trying to find a way to have the test scripts executed and have the results ...
3
votes
1answer
3k views

Watir : NoMethodError: undefined method `click' for nil:NilClass

I'm trying to expand a dynamic section of the UI without much success. It works like a charm in the console (using the rubyshell instance) but when I execute this in a batch on TestWise I get this ...
3
votes
1answer
641 views

Cucumber and Watin for Acceptance testing in Asp.Net MVC

If the business owner/QA are writing/running the Acceptance test against the front end of a Asp.Net Mvc Application, is there a benefit to using SpecFlow/Watin or SpecFlow/Selenium over Cucumber/Watir,...
4
votes
2answers
2k views

Watir, Selenium::WebDriver for Chrome?

I've been using Watir for a month or so now and use profile = Selenium::WebDriver::Firefox::Profile.new profile.proxy = Selenium::WebDriver::Proxy.new :http=> proxy # proxy = "IP:Port" This ...
6
votes
1answer
745 views

Can you use Watir successfully with AJAX\GWT Applications

It seems that some UI automation tools struggle with GWT grids & the asynchronous aspect of Ajax based applications. Has anyone tried Watir with an GWT\Ajax application. Please share your ...
6
votes
2answers
2k views

Is drag-and-drop possible in watir-webdriver?

I would like to drag-and-drop one element to the position of another, triggered from within a watir-webdriver script. By "drag-and-drop" I mean picking up a draggable element and releasing it on ...
24
votes
16answers
37k views

Under what circumstances is Sikuli better for test automation than Selenium or Watir?

The Sikuli website says: Sikuli is a visual technology to automate and test graphical user interfaces (GUI) using images (screenshots). Under what circumstances is Sikuli a better technology for ...
4
votes
1answer
2k views

Problems with escaping the equals sign in a Watir Robot argument

We're currently using the very lovely Robot Framework for our automation. Unfortunately, we've run into a hitch with the '=' character - we have a number of places in the app where we have a link to ...
8
votes
3answers
5k views

Good Watir or Watir-Webdriver tutorials/resources for new-to-automation testers?

There are at least two really good books for Selenium beginners, and quite a few courses/tutorials out there, as well as a lot of blogs. However, I haven't seen quite as much out there for Watir - I'...
5
votes
4answers
4k views

How can I select a file to put into a file_field without using the absolute path with Watir / Ruby?

For example, consider the following script: require 'rubygems' require 'watir-webdriver' browser = Watir::Browser.new(:firefox) browser.goto("http://tinypic.com/") file = "C:\\\\assets\\image....
12
votes
9answers
14k views

Whether to choose Selenium over Watir or Lightweight Test Automation when testing web applications created using C Sharp?

I am currently researching testing frameworks to test C Sharp developed web applications. I have been leaning more towards the use of Selenium over Watir or Lightweight Test Automation but hesitant ...