Questions tagged [safariwatir]

SafariWatir stands for "Web Application Testing in Ruby for Safari". SafariWatir is a free, open-source functional testing tool for driving the Safari browser the same way an end user would. It clicks links, fills in forms, presses buttons and checks results.

SafariWatir stands for "Web Application Testing in Ruby for Safari". SafariWatir is a free, open-source functional testing tool for automating browser-based tests of web applications. It works with applications written in any language. SafariWatir drives the Safari browser the same way an end user would. It clicks links, fills in forms, presses buttons. SafariWatir also checks results, such as whether expected text appears on the page, or whether a control is enabled.

SafariWatir has been deprecated and replaced by Watir-Webdriver.

16 questions
19
votes
7 answers

How to use watir-webdriver to wait for page load

Using watir-webdriver, how do I wait for a page to load after I click a link? At the moment I am using: sleep n But this is not ideal as the page response varies so much. Is there a way to test whether the page is ready or whether there is a…
user138095
5
votes
2 answers

How can I get watir-webdriver and safariwatir working together?

Good morning, I am setting up watirgrid and I have been partly successful, however I am having problems getting all the providers to work with my ruby script. On my Mac I have setup a provider from the command line using: provider -d safariwatir -c…
Russell Seymour
  • 1,333
  • 1
  • 16
  • 35
4
votes
3 answers

How to unload 'require' in ruby/rspec?

We are currently running rspec tests that check for specific libraries/models to be loaded. Specifically, we want to test that when creating an object, we get the correct Watir object back: Watir::Browser for FF and Chrome, and Watir::Safari for…
corroded
  • 21,406
  • 19
  • 83
  • 132
3
votes
2 answers

Save screenshot with Watir

I am using Watir with Ruby on Rails. I need to save screenshots of couple of pages using Watir. I have managed to get the page that I want to open to show in a browser, but cannot save the screenshot yet. Here's my code: @browser =…
rookieRailer
  • 2,313
  • 2
  • 28
  • 48
3
votes
1 answer

How can I continuously open websites using Watir?

I have an array of url strings (i.e. "http://www.cnn.com") which I want to iterate through and open in Safari using watir. urlArray.each do |url| browser.goto(url) end will open the first page, but it never proceeds to the next pages in the array.…
YuKagi
  • 2,451
  • 3
  • 21
  • 26
3
votes
1 answer

safariwatir: how to select anonymous button

I'm using watir for safari with ruby 1.8.7 on OSX Snow leopard. I want to click a button, the only one in the page, that has neither id nor name. It only has an onckick property and the text within the tag.. How to do that? Is there a way to list…
luca
  • 12,311
  • 15
  • 70
  • 103
3
votes
1 answer

Safari on windows doesn't work with watir-webdriver

Now that Safari is supported by default, I didn't try to compile my own Safari webdriver. I downloaded and installed Safari 5.1.7 on my Windows 8.1. I have the latest version of watir-webdriver and selenium-webdriver installed. When I tried @browser…
Navin
  • 273
  • 3
  • 15
2
votes
2 answers

Watir: password field unfindable in Safari

I'm brand new to Watir. I'm using SafariWatir on a fully updated MBP Snow Leopard. So far I've successfully used goto, link, text_field, and button but when I try to access a text_field with type="password" name="pass" id="pass" (as seen in Web…
themirror
  • 9,963
  • 7
  • 46
  • 79
2
votes
1 answer

Issues with link on Watir and Safari?

I am new in using watir but I can only imagine this to be a bug: require "watir" Watir::Browser.default = 'safari' b = Watir::Browser.new b.goto() => nil b.link(:title, "Start").click Leads me to the next page as expected…
Thorsten
  • 21
  • 1
1
vote
1 answer

Getting cell text from a table using Watir on Mac Safari

I've been pulling my hair out trying to figure out why Safari isn't getting cell text from a table. It seems like this should be working require 'rubygems' require 'safariwatir' @b = Watir::Safari.new @b.goto(my_webpage) cell = @b.table(:class,…
Brad Askins
  • 53
  • 1
  • 1
  • 6
1
vote
1 answer

Running safariwatir against watirspec

I am following Running safariwatir against watirspec instructions from safariwatir readme. $ git clone git://github.com/redsquirrel/safariwatir.git Cloning into safariwatir... ... $ cd safariwatir $ git submodule update --init Submodule…
Željko Filipin
  • 56,372
  • 28
  • 94
  • 125
1
vote
1 answer

Watir::Safari js eval equivalent?

I've seen and tried many incantations of js eval in the various Watir's out there. firewatir for ffox, as well as safariwatir. In firefox, I got things working but need Safari as my project is webkit based. For example, in the firefox version I can…
Rob
  • 4,093
  • 5
  • 44
  • 54
0
votes
1 answer

Select_list not working with Watir

I am using safariwatir and I can't seem to get my code to work on selecting an option from a list. the syntax i used to select is: browser.select_list(:id," select").select_value("USA") Here is the HTML code for the table itself:
0
votes
2 answers

Watir Webdriver Safari : A modal dialog was opened. The SafariDriver does not support interacting with modal dialogs

While using the watir safari webdriver, the webdriver terminates as soon as it encounters an alert pop-up. Are there any workarounds that will either allow Safari webdriver to function properly with alerts, or to prevent the alerts from appearing at…
Dimi
  • 193
  • 1
  • 3
  • 13
0
votes
1 answer

Locating a input of type email with SafariWatir

I just started using Watir to write some simple tests for my web application. First thing I want to do is to populate an login form with an email input element of type "email" with SafariWatir on OS X. This won't work: browser.text_field(:id,…
ptz0n
  • 461
  • 3
  • 14
1
2