硒和硒的错误python,selenese命令抛出错误

时间:2016-03-07 01:33:37

标签: python python-2.7 selenium

我看到的错误:

 ======================================================================
ERROR: test_1 (__main__.Test1)
----------------------------------------------------------------------
Traceback (most recent call last):




  File "test1.py", line 23, in test_1
    driver.find_element_by_link_text("Login").click()
  File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 282, in find_element_by_link_text
    return self.find_element(by=By.LINK_TEXT, value=link_text)




  File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 712, in find_element
    {'using': by, 'value': value})['value']




  File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 201, in execute
    self.error_handler.check_response(response)




  File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
    raise exception_class(message, screen, stacktrace)

NoSuchElementException: Message: Unable to locate element: {"method":"link text","selector":"Login"}
Stacktrace:


    at FirefoxDriver.prototype.findElementInternal_ (file:///var/folders/xz/td457dt94m7001pgpht81bx00000gp/T/tmpwjEsuk/extensions/fxdriver@googlecode.com/components/driver-component.js:10723)

    at fxdriver.Timer.prototype.setTimeout/<.notify (file:///var/folders/xz/td457dt94m7001pgpht81bx00000gp/T/tmpwjEsuk/extensions/fxdriver@googlecode.com/components/driver-component.js:623)

----------------------------------------------------------------------
Ran 1 test in 39.599s

FAILED (errors=1)

0 个答案:

没有答案