Turn off chrome pdf reader plugin with ruby/watir

Here is the scenario/rabbit hole: I need to turn off the chrome pdfreader plugin so that pdfs automatically download rather than load in the reader. I am using ruby and watir. seems simple enough, the setting is located at: chrome://settings/conte...
more »

2017-11-04 16:11 (1) Answers

Capture immediate child in HTML

Using watir-webdriver with Ruby 2.3.3 I need to find all Div's having attribute(data-id) from below HTML <div id="response1"> <div data-id="2"> <span>XYZ</span></div> <div data-id="3"> <span>XYZ...
more »

2017-10-19 15:10 (1) Answers

Latest Watir version supports Edge?

I see WATIR supports Edge browser automation in official website. But when I tried to run my existing suite on Edge after setting the path for MicrosoftWebDriver.exe in environment variables I am facing the below error . Selenium::WebDriver::Erro...
more »

2017-10-08 09:10 (1) Answers

Element is not clickable error Ruby / Watir

In my test, I am attempting to hit etsy.com, do a search, click on a result, and add the item to my cart. I'm able to do everything up until the point where I attempt to click on the 'add to cart' button. The code below actually works in the IRB so...
more »

2017-10-05 16:10 (1) Answers

Use Currently Saved Cookies in Watir Webdriver

Is it possible to use currently saved cookies in Watir Webdriver when launching Chrome? I set my chrome to "remember me" when login to facebook so that the next time I access facebook, I don't have to type the username and password again. But, when ...
more »

2017-09-26 07:09 (1) Answers

Ruby Watir radio checkbox

i m trying to set the checkbox on a radio control with the .set? option. it returns false but I'm unable to set the checkbox. <div class=""> <input name="radiostorage" id="zrs" value="2" type="radio"> <label for="zrs">Zone-redundan...
more »

2017-09-20 17:09 (2) Answers

Can not set path to a hidden file_Field with Watir

I'm using Ruby and Watir to test UI. I encounted an issue and didn't figure out how to solve it yet. I have a file field element that has style: 'display: none' and when i try to set a path to a file it returns me a "File Not Found message". The sam...
more »

2017-09-05 09:09 (1) Answers

How to programmatically click google maps icons

Take a look at this map: This map pops up when you visit https://www.hertzcarsales.com/, and click "Change" next to with "Within X miles of Y" dropdown selector. Anyway, I cannot right click on the little H's to inspect with FireBug, and I can't s...
more »

2016-10-02 03:10 (1) Answers

Watir Timeout issue with Firefox

I am attempting to run the following ruby code via RubyMine: require 'rubygems' require 'watir-webdriver' browser = Watir::Browser.new :firefox browser.goto 'http://www.apple.com' When I run I get the following error: firefox connection in 60 seco...
more »

2016-09-22 22:09 (1) Answers

Watir how to click on nested element

I'm trying to click on "Mr" from the drop down list I've tried a combination of things but non of them seem to work. I've even tried xpath which is usually reliable but for this case its failing. $browser.element(:xpath, "/html/body/div[1]/div[1]...
more »

2016-06-10 12:06 (2) Answers