Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x selenium.common.exceptions.WebDriverException:消息:未知错误:调用函数结果丢失';价值';_Python 3.x_Selenium_Appium_Ui Testing - Fatal编程技术网

Python 3.x selenium.common.exceptions.WebDriverException:消息:未知错误:调用函数结果丢失';价值';

Python 3.x selenium.common.exceptions.WebDriverException:消息:未知错误:调用函数结果丢失';价值';,python-3.x,selenium,appium,ui-testing,Python 3.x,Selenium,Appium,Ui Testing,我正在尝试自动化我的混合应用程序,我需要在输入字段中输入详细信息,但使用发送键(“文本值”)在我的情况下不起作用。我得到了一个例外 selenium.common.exceptions.WebDriverException:消息:未知错误:调用函数结果缺少“值” def test_login(self): self.driver.implicitly_wait(15) loginemail = self.driver.find_element_by_id("userId"

我正在尝试自动化我的混合应用程序,我需要在输入字段中输入详细信息,但使用
发送键(“文本值”)
在我的情况下不起作用。我得到了一个例外
selenium.common.exceptions.WebDriverException:消息:未知错误:调用函数结果缺少“值”

    def test_login(self):
    self.driver.implicitly_wait(15)
    loginemail = self.driver.find_element_by_id("userId")
    loginpass = self.driver.find_element_by_id("userPassword")
    email = loginemail.find_element_by_xpath("//*[@id='userId']/input")
    email.click()

    email.send_keys("xxxxlabs.com")
以下是完整的错误消息:

File "/home/martial/PycharmProjects/pytestAndroid/test_login_android.py", line 45, in test_login
email.send_keys("xxxxlabs.com")
File "/home/martial/PycharmProjects/pytestAndroid/venv/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 347, in send_keys
self._execute(Command.SEND_KEYS_TO_ELEMENT, {'value': keys_to_typing(value)})
File "/home/martial/PycharmProjects/pytestAndroid/venv/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 491, in _execute
return self._parent.execute(command, params)
File "/home/martial/PycharmProjects/pytestAndroid/venv/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 238, in execute
self.error_handler.check_response(response)
File "/home/martial/PycharmProjects/pytestAndroid/venv/lib/python3.6/site-packages/appium/webdriver/errorhandler.py", line 29, in check_response
raise wde
File "/home/martial/PycharmProjects/pytestAndroid/venv/lib/python3.6/site-packages/appium/webdriver/errorhandler.py", line 24, in check_response
super(MobileErrorHandler, self).check_response(response)
File "/home/martial/PycharmProjects/pytestAndroid/venv/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 193, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: call function result missing 'value'

我在使用chromedriverv2.33时遇到此错误-当我更新到v2.36时,错误消失了(这是在mac上使用chromedriver\u mac64.zip文件下载的:)

问题:org.openqa.selenium.webdriverexception:未知错误:调用函数结果缺少“值”。请查看以下步骤以解决此类错误

回答更新浏览器版本。请按照以下步骤获取最新版本的浏览器

  • 转到:
  • CTRL+F并搜索“第三方浏览器驱动程序”。所有浏览器都列在那里
  • 单击浏览器名称/版本-它将重定向到另一个页面。(例如-)
  • 为您的操作系统下载合适的驱动程序
  • 将驱动程序放在其中一个文件夹中,从该文件夹调用SeleniumWebDriver脚本的驱动程序。它工作正常,没有任何错误 谢谢:)