TA的每日心情 | 开心 2017-2-23 09:15 |
---|
签到天数: 13 天 连续签到: 1 天 [LV.3]测试连长
|
8#
楼主 |
发表于 2016-11-8 17:32:23
|
只看该作者
Traceback (most recent call last):
File "C:\Users\admin\Desktop\系统管理.py", line 57, in test_
driver.find_element_by_class_name(u"(//a[contains(text(),'缂栬緫')])[15]").click()
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 413, in find_element_by_class_name
return self.find_element(by=By.CLASS_NAME, value=name)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 752, in find_element
'value': value})['value']
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
InvalidSelectorException: Message: The given selector (//a[contains(text(),'\u7f16\u8f91')])[15] is either invalid or does not result in a WebElement. The following error occurred:
InvalidSelectorError: An invalid or illegal class name was specified
Stacktrace:
at FirefoxDriver.annotateInvalidSelectorError_ (file:///c:/users/admin/appdata/local/temp/tmpyqeog5/extensions/fxdriver@googlecode.com/components/driver-component.js:10744)
at FirefoxDriver.prototype.findElementInternal_ (file:///c:/users/admin/appdata/local/temp/tmpyqeog5/extensions/fxdriver@googlecode.com/components/driver-component.js:10775)
at FirefoxDriver.prototype.findElement (file:///c:/users/admin/appdata/local/temp/tmpyqeog5/extensions/fxdriver@googlecode.com/components/driver-component.js:10779)
at DelayedCommand.prototype.executeInternal_/h (file:///c:/users/admin/appdata/local/temp/tmpyqeog5/extensions/fxdriver@googlecode.com/components/command-processor.js:12661)
at DelayedCommand.prototype.executeInternal_ (file:///c:/users/admin/appdata/local/temp/tmpyqeog5/extensions/fxdriver@googlecode.com/components/command-processor.js:12666)
at DelayedCommand.prototype.execute/< (file:///c:/users/admin/appdata/local/temp/tmpyqeog5/extensions/fxdriver@googlecode.com/components/command-processor.js:12608)
----------------------------------------------------------------------
Ran 1 test in 27.662s
FAILED (errors=1)
html代码: |
|