TA的每日心情 | 开心 2017-2-23 09:15 |
---|
签到天数: 13 天 连续签到: 1 天 [LV.3]测试连长
|
3#
楼主 |
发表于 2016-12-1 16:19:08
|
只看该作者
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
class test (unittest.TestCase):
def setUp(self):
self.driver = webdriver.Chrome()
self.driver.implicitly_wait(30)
self.base_url = "http://test.robotscloud.com/"
self.verificationErrors = []
self.accept_next_alert = True
报的错误信息
----------------------------------------------------------------------
Traceback (most recent call last):
File "F:\萝卜头自动化脚本\管理平台\xitongguanl.py", line 12, in setUp
self.driver = webdriver.Chrome()
File "C:\Python27\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 62, in __init__
self.service.start()
File "C:\Python27\lib\site-packages\selenium\webdriver\common\service.py", line 71, in start
os.path.basename(self.path), self.start_error_message)
WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (errors=1)
>>>
变量环境:%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Python27\Scripts;C:\Users\Administrator\AppData\Local\Google\Chrome\Applicatio |
|