Chrome browser opens and closes using watir webdriver
Asked Answered
P

1

2

I have the following code:

require "rubygems"
require "watir-webdriver"
browser = Watir::Browser.new(:chrome)
browser.goto "http://google.com"

When i run this code, the browser opens the site google.com and then closes automatically Why does it close automatically? My chrome version is 12.0.742.68

Palacios answered 30/5, 2011 at 12:52 Comment(5)
OS (Windows, Mac, Linux...)? watir-webdriver version? Any error messages?Keating
OS is Windows 7, Watir-webdriver 0.2.3, No error message is displayed. This is the only message that is displayed Started ChromeDriver port=34882Palacios
See this other SO thread from a little while ago, it sounds like the exact same sort of issue #6074059Cervantez
Also met this issue today. OS: Windows Browser: Chrome 12.0.742.112 Error msg: Only "Started ChromeDriver port=29948" is displayed.Unbeaten
I suggest that you tag this with webdriver and/or selenium tags too, maybe webdriver/selenium people will be able to help.Keating
G
3

The Chrome driver will close all browser instances when your program exits. It's a known issue, and its priority was fortunately bumped today - look for a fix soon.

Gynaecomastia answered 20/7, 2011 at 22:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.