TA的每日心情 | 郁闷 2015-8-14 14:38 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
测试使用xpath定位一个Button按钮,循环第一次时能够定位并且单击,但是第二次时,出现错误,错误如下
Traceback (most recent call last):
File "E:\python_test\test-1.py", line 68, in <module>
driver.find_element_by_xpath("html/body/div[..]/div[3]/div/button[3]").click()
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webelement.py", line 70, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webelement.py", line 404, in _execute
return self._parent.execute(command, params)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 195, in execute
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 170, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotVisibleException: Message: Element is not currently visible and so may not be interacted with
Stacktrace:
at fxdriver.preconditions.visible (file:///c:/users/admini~1/appdata/local/temp/tmp4yhwzc/extensions/fxdriver@googlecode.com/components/command-processor.js:9615)
at DelayedCommand.prototype.checkPreconditions_ (file:///c:/users/admini~1/appdata/local/temp/tmp4yhwzc/extensions/fxdriver@googlecode.com/components/command-processor.js:12265)
at DelayedCommand.prototype.executeInternal_/h (file:///c:/users/admini~1/appdata/local/temp/tmp4yhwzc/extensions/fxdriver@googlecode.com/components/command-processor.js:12282)
at fxdriver.Timer.prototype.setTimeout/<.notify (file:///c:/users/admini~1/appdata/local/temp/tmp4yhwzc/extensions/fxdriver@googlecode.com/components/command-processor.js:603)
|
|