神仙也考试 发表于 2017-5-24 14:21:08

Selenium3离线包+Python2.7+谷歌驱动自动化环境搭建

Selenium3离线包+Python2.7+谷歌驱动自动化环境搭建

---需要的就自行到附件免费下载吧,个人原创,请勿盗版:lol

梦想家 发表于 2017-5-24 14:47:55

Brain_vpkung 发表于 2017-6-13 01:12:33

C:\Users\Albert\Desktop

怎么没有出现版本信息呢,我环境变量也改了

阿星爱美酒 发表于 2017-6-14 14:28:06

有对应的使用方法说明不。谢谢。

神仙也考试 发表于 2017-6-14 15:23:44

阿星爱美酒 发表于 2017-6-14 14:28
有对应的使用方法说明不。谢谢。

不清楚你所说的使用方法说明是什么意思。。。

神仙也考试 发表于 2017-6-14 15:24:19

Brain_vpkung 发表于 2017-6-13 01:12
怎么没有出现版本信息呢,我环境变量也改了

不清楚你具体是哪个步骤有问题,建议你截图出来看看

zanjs 发表于 2017-6-16 13:23:08

楼主辛苦了啊

fuzizhichenxin2 发表于 2017-6-20 16:06:50

配置后谷歌启动不了
ython 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) on win32
Type "copyright", "credits" or "license()" for more information.
>>>
================= RESTART: C:/Users/joyce-pc/Desktop/test.py =================

Traceback (most recent call last):
File "C:/Users/joyce-pc/Desktop/test.py", line 3, in <module>
    browser = webdriver.chromedriver()
AttributeError: 'module' object has no attribute 'chromedriver'
>>>

丰卉者 发表于 2017-10-18 16:37:28

============ RESTART: C:\Program Files\Python36\web-auto-test.py ============
Traceback (most recent call last):
File "C:\Program Files\Python36\web-auto-test.py", line 3, in <module>
    browser = webdriver.chromedriver()
AttributeError: module 'selenium.webdriver' has no attribute 'chromedriver'

神仙也考试 发表于 2017-10-18 17:07:23

丰卉者 发表于 2017-10-18 16:37
============ RESTART: C:\Program Files\Python36\web-auto-test.py ============
Traceback (most recen ...

使用:
browser = webdriver.Chrome()

神仙也考试 发表于 2017-10-18 17:07:37

fuzizhichenxin2 发表于 2017-6-20 16:06
配置后谷歌启动不了
ython 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40)

使用:
browser = webdriver.Chrome()

丰卉者 发表于 2017-10-19 09:05:04

Python 3.6.3 (v3.6.3:2c5fed8, Oct3 2017, 18:11:49) on win32
Type "copyright", "credits" or "license()" for more information.
>>>
================= RESTART: C:\Program Files\Python36\zcl.py =================
Traceback (most recent call last):
File "C:\Program Files\Python36\zcl.py", line 2, in <module>
    browser = webdriver.Chrome()
File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
    desired_capabilities=desired_capabilities)
File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 151, in __init__
    self.start_session(desired_capabilities, browser_profile)
File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 240, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 308, in execute
    self.error_handler.check_response(response)
File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 6.1.7601 SP1 x86_64)

丰卉者 发表于 2017-10-19 09:06:53

使用这个后:
browser = webdriver.Chrome()

报以下错误:百度之后,也没有找到解决办法
Python 3.6.3 (v3.6.3:2c5fed8, Oct3 2017, 18:11:49) on win32
Type "copyright", "credits" or "license()" for more information.
>>>
================= RESTART: C:\Program Files\Python36\zcl.py =================
Traceback (most recent call last):
File "C:\Program Files\Python36\zcl.py", line 2, in <module>
    browser = webdriver.Chrome()
File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
    desired_capabilities=desired_capabilities)
File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 151, in __init__
    self.start_session(desired_capabilities, browser_profile)
File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 240, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 308, in execute
    self.error_handler.check_response(response)
File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 6.1.7601 SP1 x86_64)

神仙也考试 发表于 2017-10-19 09:11:16

丰卉者 发表于 2017-10-19 09:05
Python 3.6.3 (v3.6.3:2c5fed8, Oct3 2017, 18:11:49) on win32
Type "cop ...

我用的是Python2.7的,3.6版本下没测试过。。。

看报错提示想找不到谷歌的库文件,或者你再装一下Selenium

丰卉者 发表于 2017-10-19 13:52:03

你有ChromeDriver 2.33版本win64位的驱动吗?

神仙也考试 发表于 2017-10-19 14:30:17

丰卉者 发表于 2017-10-19 13:52
你有ChromeDriver 2.33版本win64位的驱动吗?

https://chromedriver.storage.googleapis.com/index.html?path=2.33/


这个是谷歌驱动的网址,自行去下载吧。。。Windows下是没有64位的驱动的

75373163 发表于 2018-3-16 09:48:20

:handshake

fuming123 发表于 2018-4-9 11:20:41


Selenium3离线包 再哪下载啊,新来的,不懂

yangsheng-1 发表于 2020-2-19 18:03:40

好东西呀,感谢楼主啦

Miss_love 发表于 2020-12-25 14:00:49

支持下
页: [1]
查看完整版本: Selenium3离线包+Python2.7+谷歌驱动自动化环境搭建