0
我最初使用打开浏览器窗口:硒打开浏览器已经关闭,我仍然记录在
$driver = Selenium::WebDriver.for :firefox, :profile => profile
,然后运行的代码登录到该网站。
我然后关闭使用
$driver.quit
我想重新开启,而不必再次登录运行对现场测试的浏览器窗口。我想知道是否有办法打开浏览器保留我登录的cookie。
现在,如果我做另一个$ driver = Selenium :: WebDriver.for:firefox,:profile => profile,它显示我没有登录。
相关:http://stackoverflow.com/questions/15058462/how-to-save-and-load-cookies-using-python-selenium-webdriver。 – alecxe 2015-04-03 18:53:39