Questions tagged [watir-webdriver]

Watir (Web Application Testing in Ruby) implementation built on WebDriver's Ruby bindings. Used for web browser automation, this tool allows you to code in Ruby using the friendly Watir API but get the cross browser support of Webdriver to automate Chrome, Firefox, IE, Opera or a 'headless' browser. Distributed as a Ruby gem named 'watir-webdriver'

For those who don’t know what Watir-WebDriver is, it’s basically a nice Watir (ruby) implementation on WebDriver, so it gives you five browsers (four real, one headless) using one neat API, out of the box.

The Watir API uses an object model that parallels the HTML element model and the browser DOM. This allows you to write very natural OOP code where you can have a button in the UI click itself. (as opposed to Selenium where the 'browser' object does everything, and takes the elements as parameters for methods like click.

See: watirwebdriver.com

1623 questions
171
votes
20 answers

Disable developer mode extensions pop up in Chrome

Since the latest release of chrome (34.0.1847.116) last week, I have been receiving the “Disable developer mode extensions" when running automated tests using watir-webdriver. This seems to be the offensive extension but it doesn't make sense to…
21
votes
3 answers

Setting browser window size in Watir-webdriver

How can you specify the size of the browser window opened when you call the following with watir-webdriver? browser = Watir::Browser.new(:firefox)
Alastair Montgomery
  • 1,756
  • 5
  • 21
  • 44
20
votes
2 answers

How do I change the page load Timeouts in Watir-Webdriver (timeout in .click method)

I have the following code browser.link(:text => 'Generate Report').click browser.radio(:value => 'byTotalValue').wait_until_present(180) which requests that a report be generated and then waits for the report by looking for an element on the…
user1142012
  • 323
  • 1
  • 3
  • 7
19
votes
9 answers

Disable chrome download multiple files confirmation

I developed a crawler with ruby watir-webdriver that downloads some files from a page. My problem is that when I click to download the second file, Chrome opens a bar in the top asking for confirmation that I am downloading multiple files from this…
17
votes
3 answers

How do I use Watir::Waiter::wait_until to force Chrome to wait?

I'm trying to tell my watir script to wait for an ajax-injected login box to open up. I am using watir-webdriver, and testing in Chrome. I cannot get wait_until to work, as commented in the below (simplified) script. require "rubygems" require…
karim79
  • 339,989
  • 67
  • 413
  • 406
16
votes
3 answers

Can watir-webdriver capture console errors?

I am wondering if watir-webdriver as the ability to log the output of any console errors? This would be equivalent to manually opening the console in a browser and watching for JS errors as a page loads. Can I capture this through watir-webdriver…
negativebase
  • 169
  • 1
  • 6
16
votes
4 answers

selenium scroll element into (center of) view

When an element is out of view with selenium and one tries to interact with it, selenium will usually scroll the element into view first implicitly. This is great except that what is annoying is that it usually puts in the element just enough into…
mango
  • 5,577
  • 4
  • 29
  • 41
15
votes
3 answers

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 another. By "possible" I mean any method for drag/drop…
kinofrost
  • 768
  • 6
  • 16
15
votes
7 answers

how to scroll a web page using watir

I am trying to scroll a web page to find and click on a content that is lazily loaded when the page is scrolled. I am using following command require 'watir-webdriver' @browser = Watir::new :firefox @browser.send_keys :space I am using web-driver…
amjad
  • 2,876
  • 7
  • 26
  • 43
14
votes
1 answer

Modal dialog present (Selenium::WebDriver::Error::UnhandledAlertError) after dismissing confirm popup

I have a page with something like this: When I go to the page and click the link: require "watir-webdriver" browser = Watir::Browser.new browser.goto…
Željko Filipin
  • 56,372
  • 28
  • 94
  • 125
13
votes
2 answers

how to find best matching element in array of numbers?

I need help with something that seems simple but confuses me. Trying to write some fuzzy matching method that copes with differences in format between what value is computed as needed, and which are actually available from a selection list. The…
Marcos
  • 4,796
  • 5
  • 40
  • 64
12
votes
3 answers

Watir-webdriver or Capybara

I currently use Watir-webdriver for all my front end testing, but the development team use Capybara to run their tests on Jenkins CI. We both use the same Cucumber features. Is it worth us doing seperate tests and effectively twice? Which one is…
Azher
  • 493
  • 5
  • 18
11
votes
1 answer

Using Watir-webdriver how to check the URL of a page

I am new to watir-webdriver automation, apologies if its a basic question of automation. But the thing is I am automating pagination of a website where the URL of the website changes as the user changes the page say the URL is…
NewTester
  • 301
  • 1
  • 5
  • 14
11
votes
7 answers

Watir-Webdriver Wait for Download to Complete

I am using Watir-Webdriver with Firefox and the method recommended on the watirwebdriver.com site to automate file downloads. This involves setting FireFox about:config parameters to disable the download dialog in FireFox for specific file types.…
user1142012
  • 323
  • 1
  • 3
  • 7
11
votes
2 answers

Net::ReadTimeout on headless Firefox Watir-WebDriver cukes

I started running into tons of these errors today: Net::ReadTimeout (Net::ReadTimeout) /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/net/protocol.rb:158:in `rescue in rbuf_fill' …
jonsie_araki
  • 221
  • 3
  • 8
1
2 3
99 100