watir

watir-webdriver with firefox 6.0 see following error Errno::ECONNREFUSED

女生的网名这么多〃 提交于 2020-01-05 07:09:10
问题 Currently run 150 plus scenarios nightly approximately 5000 steps. I see the following error occur around 10 times in the 5000 steps. Not a lot, nor on the same step, however don't know what to do to fix. Currently wrapping in a rescue block and retrying to work around error. Any suggestions would be great. Thanks, Jim Environment: Windows 2003 Server 32 bit FireFox 6.0.2 Ruby 1.8.7 watir-webdriver 0.3.4 selenium-webdriver 2.7.0 watir-page-helper 0.3.0 Errno::ECONNREFUSED: No connection could

watir-webdriver black screenshots

强颜欢笑 提交于 2020-01-03 13:30:13
问题 I'm using watir-webdriver to navigate around my website and grab screenshots in different browsers. Sometimes the screenshots taken in IE turn out the right size, but colored entirely black. The firefox tests that get run at the same time look fine. browser.driver.save_screenshot(screenshot_dir) Once I remote desktop to the computer running the tests the IE screenshots look okay again. A little bit after leaving remote desktop the IE screenshots go black again. I'm running these tests on a

Can not use variable in IRB after var = Watir::Browser.start 'url'

余生颓废 提交于 2020-01-03 12:02:25
问题 1.9.3-p327 :001 > require 'watir-webdriver' => true 1.9.3-p327 :002 > b = Watir::Browser.new Then firefox starts and I can do nothing. My IRB does not allow me to enter new commands. Tried different variations of browser initialization: b = Watir::Browser.new :opera b = Watir::Browser.new :firefox b = Watir::Browser.start 'url' There should appear something like: => #<OperaWatir::Browser:0x1496e57 @active_window=#<OperaWatir::Window:0x1eb1db2 @browser=#<OperaWatir::Browser:0x1496e57 ...>>,

Can not use variable in IRB after var = Watir::Browser.start 'url'

北战南征 提交于 2020-01-03 12:02:09
问题 1.9.3-p327 :001 > require 'watir-webdriver' => true 1.9.3-p327 :002 > b = Watir::Browser.new Then firefox starts and I can do nothing. My IRB does not allow me to enter new commands. Tried different variations of browser initialization: b = Watir::Browser.new :opera b = Watir::Browser.new :firefox b = Watir::Browser.start 'url' There should appear something like: => #<OperaWatir::Browser:0x1496e57 @active_window=#<OperaWatir::Window:0x1eb1db2 @browser=#<OperaWatir::Browser:0x1496e57 ...>>,

watir webdriver - window not found

天大地大妈咪最大 提交于 2020-01-02 22:14:11
问题 Another watir issue. This code works until add_task ... After login, the auth window closes and goes back to main window with login key. But I get this error: hi there testing add_task [remote server] file:///var/folders/3w/b7rcpqfj7kl3wtv56jt99yx00000gn/T/webdriver-profile20120919-9069-1ua1lm9/extensions/fxdriver@googlecode.com/components/command_processor.js:10212:in `unknown': Window not found. The browser window may have been closed. (Selenium::WebDriver::Error::NoSuchWindowError) require

Adding security exceptions in Firefox

老子叫甜甜 提交于 2020-01-02 10:35:42
问题 I have a script running watir-webdriver(using Firefox 4.0) that needs to access a web page that Firefox thinks has an invalid certificate. The problem is that after I accept the certificate, Firefox just goes right back to the same page as if I never accepted it. This only occurs if Firefox was started from watir-webdriver. If I start it manually, it will properly accept the security exception. 回答1: The Firefox driver creates a new anonymous profile for each instance, so that it's working in

Watir-webdriver throws 'not clickable' error even when element is visible, present

跟風遠走 提交于 2020-01-02 05:42:18
问题 I am trying to automate tests in Ruby using the latest Watir-Webdriver 0.9.1 , Selenium-Webdriver 2.53.0 and Chrome extension 2.21 . However the website that I am testing has static headers at the top or sometimes static footers at the bottom. Hence since Watir auto-scrolls an element into view before clicking, the elements get hidden under the static header or the static footer. I do not want to set desired_capabitlites (ElementScrollBehavior) to 1 or 0 as the websites I am testing can have

Save image with watir-webdriver

[亡魂溺海] 提交于 2020-01-01 07:22:08
问题 How could i save image, which is loaded via watir-webdriver? All manuals and examples show only fetching src of image, and using open-uri saving it. But i need to save that image, which was generated when my page was loaded. How can i do this? Could i use watir, and watir-webdriver at the same time? For example: require 'watir-webdriver' require 'watir' @driver = Watir::Browser.new :firefox @driver.goto (@base_url) @img = @driver.image(id: 'CaptchaImage').save("2131.png") How can i do

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

为君一笑 提交于 2019-12-30 10:41:46
问题 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

How do I prevent Watir from auto closing firefox?

大兔子大兔子 提交于 2019-12-25 19:39:21
问题 I am automating test cases using Ruby and Watir. One of my methods opens the web browser, but as soon as my script leaves the "open browser" method and goes to the next method (filling out forms within the browser), the browser auto closes. When I automate using the IE browser it will not close until it hits the IE.close statement, but with firefox it closes automatically. Is there any way to avoid this? Code: require 'rubygems' require 'watir-webdriver' require 'rexml/document' def