watir-webdriver

Watir Webdriver(0.9.1) No Longer Opens an Instance of Firefox

独自空忆成欢 提交于 2019-12-02 00:09:59
While using Watir Webdriver v0.9.1 for rails (along with Selenium Webdriver 2.53.1), Firefox was opening when browser = Watir::Browser.new :firefox was called. Now however, it fails on that line with unable to bind to locking port 7054 within 45 seconds @ /Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/socket_lock.rb:59:in `lock' /Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/socket_lock.rb:40:in `locked' /Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1

Unable to start browser from Jenkins CI

倾然丶 夕夏残阳落幕 提交于 2019-12-01 23:11:37
I am unable to start the browser on the CI server (localhost on Linux in my case) when triggering a cucumber test via invoking a rake task after build from Jenkins. Jenkins console log is as below. I am pretty sure everything is set up properly, as I can run it successfully on the server via command line. 01:26:43 [cucumber] $ /usr/local/rvm/scripts/gems/ruby-2.3.0/bin/rake schedule_win_job:features --trace 01:26:43 ** Invoke schedule_win_job:features (first_time) 01:26:43 ** Execute schedule_win_job:features 01:26:43 /usr/local/rvm/scripts/rubies/ruby-2.3.0/bin/ruby -S bundle exec cucumber -

How can we get Watir-Webdriver to work with the IE invalid cert screen?

梦想的初衷 提交于 2019-12-01 21:15:44
We've probably all seen this screen when testing, all you need is a HTTPS site with a self signed cert and you get the "There is a problem with this website's security certificate" screen, which requires you to click a link to continue. With Watir this is no problem, I automate the screen as I would any other webpage, clicking the link according to its text or ID value. With Watir-Webdriver it's as if nothing inside the HTML can be recognized. and I'm not alone in this See this question It's not just trying to click a link, nearly anything you try here will fail on this page Even a simple

Can't connect to Tor-Firefox via Watir

我只是一个虾纸丫 提交于 2019-12-01 21:08:49
I am having issues connecting to Tor via Ruby - Watir webdriver. I use the Tor Browser Bundle. The problem is that when I try to connect via Watir (Selenium) I cannot seem to open Tor instead of regular Firefox. Looking at similar issues I've tried the following: require 'watir-webdriver' profile = Selenium::WebDriver::Firefox::Profile.new profile['network.proxy.socks'] = '127.0.0.1' #the proxy tor uses profile['network.proxy.socks_port'] = 9150 #I cannot use 9050, 9150 works when I use Tor profile['network.proxy.type'] = 1 browser = Watir::Browser.new :firefox, :profile => profile browser

Accessing elements from within a iFrame -fails in watir-webdriver 0.6.6 - works fine in 0.6.4

笑着哭i 提交于 2019-12-01 13:49:16
I am trying to select a value in a dropdown which is inside a iFrame. The frame is nested within a table. HTML: <html class ="some text"> <head>...</head> <body id="htmlBody"> <div class= "modalWindow ui-dialog-content ui-widget-content ModalWindow containsFrame" id="ui-id-2"> <iframe src= "/MyApplicantPortal/Applicant/254471/SelectOrderTemplate?t=1"> #document <html class = "some text" <head id= "Head1"> <body id="htmlBody"> <form method= "post" action="SelectOrderTemplate?t=1" id="form1"> <div class = "ModalContent"> <Table> <td class="label1"> <Select id= "MyselList" </td> My code: element(

Unable to access text field in an iframe

我与影子孤独终老i 提交于 2019-12-01 13:35:46
问题 I am trying to automate script for testing using Watir-Webdriver. While writing a script, I am at a point where I have to fill in log in details. Now would it have been in a simple text_field, I know the syntax and it would be easier. But when I inspect elements on that page, I see following: <div class="signin-part"> <iframe id="zohoiam" frameborder="0" allowtransparency="true" style="width:430px;height:350px;margin: 0;float:left" src="https://accounts.zoho.com/login?servicename=ZohoCRM

How to deal with a page which fails to load and continue testing in Watir-Webdriver

怎甘沉沦 提交于 2019-12-01 12:45:49
I have looked for answer on other questions but I can't find one. My problem is that I have a number of results that I need to test but my script keeps failing when I hit an Url that doesn't load a page. The following Url does not load. When this Url does not load I want to continue with my testing. http://www.mycounciltax.org.uk/results?postcode=WC1N1DF&search=Search I have tried to use: begin Timeout::timeout(30) do //enter part that is hanging end end However the script just exits. Below is the full script that I am using. The script will time out and exit on.... browser.goto "http://www

Can a watir browser object be re-used in a later Ruby process?

≡放荡痞女 提交于 2019-12-01 10:40:36
So let's say pretty often a script runs that opens a browser and does web things: require 'watir-webdriver' $browser = Watir::Browser.new(:firefox, :profile => "botmode") => #<Watir::Browser:0x7fc97b06f558 url="about:blank" title="about:blank"> It could end gracefully with a browser.close, or it could crash sooner and leave behind the memory-hungry Firefox process, unnoticed until they accumulate and slow the server to a crawl. My question is twofold: What is a good practice to ensure that even in case of script failure anywhere leading to immediate error exit, the subprocess will always get

Accessing elements from within a iFrame -fails in watir-webdriver 0.6.6 - works fine in 0.6.4

≡放荡痞女 提交于 2019-12-01 10:28:24
问题 I am trying to select a value in a dropdown which is inside a iFrame. The frame is nested within a table. HTML: <html class ="some text"> <head>...</head> <body id="htmlBody"> <div class= "modalWindow ui-dialog-content ui-widget-content ModalWindow containsFrame" id="ui-id-2"> <iframe src= "/MyApplicantPortal/Applicant/254471/SelectOrderTemplate?t=1"> #document <html class = "some text" <head id= "Head1"> <body id="htmlBody"> <form method= "post" action="SelectOrderTemplate?t=1" id="form1">

Dismiss “Confirm Navigation” popup with Watir

允我心安 提交于 2019-12-01 04:16:29
I am trying to dismiss "Confirm Navigation" popup. This is how it looks like in Chrome. To see the popup: require "watir-webdriver" browser = Watir::Browser.new browser.goto "http://www.gravityforms.com/demo/wp-admin/admin.php?page=gf_new_form" browser.text_field(:id => "user_login").set "demo" browser.text_field(:id => "user_pass").set "demo" browser.button(:id => "wp-submit").click browser.refresh At the moment I override onbeforeunload when I visit the page, as suggested at http://watirwebdriver.com/javascript-dialogs/ browser.execute_script("window.onbeforeunload = function() {};") So, the