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 开发者_如何学JAVAautomatically? My chrome version is 12.0.742.68
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.
精彩评论