Chrome browser opens and closes using watir webdriver

半腔热情 提交于 2019-12-07 23:00:03

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/6176526/chrome-browser-opens-and-closes-using-watir-webdriver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!