C:UsersPycharmProjectsAppiumSandboxvenvScriptspython.exe C:/Users/PycharmProjects/AppiumSandbox/tests/contactone.py Traceback (most recent call last): File “C:/Users/PycharmProjects/AppiumSandbox/tests/contactone.py”, line 21, in user_action.tap(x=909, y=220).perform() File “C:UsersPycharmProjectsAppiumSandboxvenvlibsite-packagesappiumwebdrivercommon ouch_action.py”, line 149, in perform self._driver.execute(Command.TOUCH_ACTION, params) File “C:UsersPycharmProjectsAppiumSandboxvenvlibsite-packagesseleniumwebdriver emotewebdriver.py”, line 319, in execute response = self.command_executor.execute(driver_command, params) File “C:UsersPycharmProjectsAppiumSandboxvenvlibsite-packagesseleniumwebdriver emote emote_connection.py”, line 367, in execute command_info = self._commands[command] KeyError: ‘touchAction’
解决方案
通过添加from appium import webdriver
和删除from selenium import webdriver
提到的自动化脚本可以解决问题。