自动化测试:python+selenium 报错问题。之前脚本运行的好好的今天就不行了,打开浏览器后,send_keys
根本没改过脚本,之前运行过,后面再运行就忽然报错这个:随便网上找了个脚本运行也是如此能打开浏览器,但是不知道后面为什么要输入就开始报错。C:\Users\sunl\App...
根本没改过脚本,之前运行过,后面再运行就忽然报错这个:随便网上找了个脚本运行也是如此
能打开浏览器,但是不知道后面为什么要输入就开始报错。
C:\Users\sunl\AppData\Local\Programs\Python\Python36\python.exe E:/自动化测试/test/test.py
Traceback (most recent call last):
File "E:/自动化测试/test/test.py", line 9, in <module>
browser.find_element_by_id("kw").send_keys("selenium")
File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webelement.py", line 349, in send_keys
'value': keys_to_typing(value)})
File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webelement.py", line 493, in _execute
return self._parent.execute(command, params)
File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 249, in execute
self.error_handler.check_response(response)
File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 193, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Expected [object Undefined] undefined to be a string 展开
能打开浏览器,但是不知道后面为什么要输入就开始报错。
C:\Users\sunl\AppData\Local\Programs\Python\Python36\python.exe E:/自动化测试/test/test.py
Traceback (most recent call last):
File "E:/自动化测试/test/test.py", line 9, in <module>
browser.find_element_by_id("kw").send_keys("selenium")
File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webelement.py", line 349, in send_keys
'value': keys_to_typing(value)})
File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webelement.py", line 493, in _execute
return self._parent.execute(command, params)
File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 249, in execute
self.error_handler.check_response(response)
File "C:\Users\sunl\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 193, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Expected [object Undefined] undefined to be a string 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询