assertions rspec on a new window

I'm using watir-webdriver and rspec to write assertions. I am running into some problems running assertions on elements of a new window. This is my method I am using: def open_window foobar = @browser.window(:title, 'Foo View') return foobar end This

How to analyze Ruby matrix data?

I'm using watir-webdriver to scrape data from a website. When I try to import the data into the DB I get the error "can't cast Array to text". def get_event_details(url) headless = headless.start b = Watir::Browser.start "http:

Error displaying HTML element in Watir

I have the following lines of code: if @browser.text_field(:id => "street").exists? puts "street exist" puts @browser.text_field(:id => "street").html else puts "street does not exist" end But after running th

Is it possible to make PhantomJS visible in Watir-WebDriver?

I know it's possible to use phantomJS with Watir-Webdriver, but is there some 'mode' I can pass it to actually see what it's doing before I decide to use the (default) headless mode?You could log all the request and responses using onResourceRequeste

Trouble clicking a button

I have a save button on my window whose html is <div class="popup supportsLink editor"> <h2></h2> <a class="close icon small" href="#"></a> <style></style> <form method="post&

Can not install watir on ruby ​​2.0 because of rubyzip

I'm trying to install watir. Had to upgrade my ruby installation so I installed rvenv and then used it to install ruby v2.0. Sagis-MacBook-Air:~ sagism$ rbenv shell 2.0.0-rc2 Sagis-MacBook-Air:~ sagism$ ruby -v ruby 2.0.0dev (2013-02-08 trunk 39161)

phantomjs via watir-webdriver, do not handle javascript alerts

I'm trying to automate some tasks on a webpage, and part of it includes clicking a link that'll show a javascript alert where you have to press "OK". Trouble is, when it gets to that point, it fails with the following error /Users/username/.gem/

watir open every link of a page

I need to scrape some info on a website that has a table where each row contains a link. I want watir to click each link in that table, grab some info from the generated page and go back to the previous page. t = browser.table(:class => "tblElenco

jruby1.6.7 + watir + cucumer1.2.1 on win7 can not open ff14.0.1

I installed jruby1.6.7 on win7 and firefox 14.0.1 and run jruby -v is ok and installed below plugin: jgem install activerecord -v='3.0.5' jgem install activerecord-jdbc-adapter -v='1.1.3' jgem install arel -v='2.2.1' jgem install color -v='1.4.1' jge

Automatically download files in watir

How to auto download the excel files from the browser in one click on the link, without going through the "save as" and other windows in watir. I am trying to keep it OS independent, so would not be interested in using win32ole gem.for this task

Script running on chrome showing errors

I used steps to run chrome script provided on this links its showing error I Installed chrome driver as steps suggested in below link but its not working

How to save the browser state after Watir automation

Summary of tools: watir-webdriver 1.8.17 Mac OS X 10.7.3 Chrome 18.0.1025.151 I'm currently using Watir WebDriver to automate Chrome sessions across a number of websites. I need to backup the state of the web browser (cookies, cache, etc.) at certain

Ruby: Kill the Chrome Process

I'm using WATIR to control browser, but there is page that never fully loads everything stucks. After 60 second timeout WATIR gives me error and I can keep writing commands, but If I try to close the browser with WATIR in made functions everything st

mootools, do not take effect

My test shows that webdriver fire_event("onmouseover") takes no effect when page has mootools lib. when remove mootools lib, fire_event("onmouseover") takes effect. how can I get a workaround? html page is following: <!DOCTYPE HTML

watir-webdriver Waiting method for IE9

I'm trying to get my code(developed with Watir for IE8) working with watir-webdriver and IE9. Currently I have an issue with waiting. For example Watir::Wait.until{browser.button(:value, "Login").exists?} It doesn't wait and gives me next error