我想使用我可以在 rdoc 中看到的 openWindow() 方法打开一个新窗口,但是每当我尝试运行我的代码时,都会被告知该方法不存在。
require 'rubygems'
require 'selenium-webdriver'
$browser = Selenium::WebDriver.for :firefox #I've tried chrome too to the same effect
$browser.navigate.to("http://google.com")
$browser.openWindow("http://cnet.com","ASDF") #This doesn't work.
$browser.open_window("http://cnet.com","ASDF") #This doesn't work either.
如果有人可以直接记录如何使用它,将不胜感激。