51Testing软件测试论坛

标题: selenium啟動chrome給出以下提醒,請問如何解決 [打印本页]

作者: l84222780    时间: 2015-9-17 08:28
标题: selenium啟動chrome給出以下提醒,請問如何解決
selenium啟動chrome給出以下提醒,可以打開網頁。但是,腳本不會跑,打印的結果頁是OK的。請問如何解決

[attach]97091[/attach]

作者: 土土的豆豆    时间: 2015-9-17 09:09
chrome连接用什么写的webdriver?
脚本呢?
作者: l84222780    时间: 2015-9-17 09:21
土土的豆豆 发表于 2015-9-17 09:09
chrome连接用什么写的webdriver?
脚本呢?

python編寫的,代碼如下:
  1. class Sousuo(unittest.TestCase):
  2.     def setUp(self):
  3.         self.driver =webdriver.Chrome()
  4.         self.driver.implicitly_wait(30)
  5.         self.base_url = "http://www.591.com.tw/"
  6.         self.verificationErrors = []
  7.         self.accept_next_alert = True
复制代码

作者: jingzizx    时间: 2015-9-17 12:50
解决方法:http://blog.csdn.net/xiecj_2006/article/details/43086731
作者: l84222780    时间: 2015-9-17 14:24
jingzizx 发表于 2015-9-17 12:50
解决方法:http://blog.csdn.net/xiecj_2006/article/details/43086731

python 貌似跟這個的啟動方式不太一樣。




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2