Appium carries out the automatic test of mobile browser. The code is as follows, but an error is reported
#Automated testing with mobile browsers import time from appium import webdriver #Automation configuration information des={ 'platformName': 'Android', 'platformVersion': '8.0', #Fill in the system version of the android virtual machine 'deviceName': 'SamSung Galaxy S9', #Fill in the device name of the android virtual machine --- the value can be arbitrary 'browserName': 'chrome', # directly specify the browser name parameter as chrome [emphasis added to this step] 'udid': '192.168.235.103:5555', # fill in the uuid viewed by command line adb devices 'noReset': True, # Make sure the app is not reset after automation 'unicodeKeyboard': True, 'resetKeyboard': True, 'chromedriverExecutable': r "C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-chromedriver\chromedriver\ win\chromedriver.exe" # Use the specified browser driver - match Google Chrome on the phone } driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', des) driver.implicitly_wait(5) driver.get('http://hao.uc.cn/')
Errors are reported as follows:
selenium.common.exceptions.WebDriverException:
Message: An unknown server-side error occurred while processing the command. Original error: Can’t stop process;
it’s not currently running (cmd: ”C:/Program Files/Appium/resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/win/chromedriver.exe’ –url-base\=wd/hub –port\=8001 –adb-port\=5037 –verbose’)
reason
It took me quite a long time to find the reason. There was no problem with the code. The problem was caused by the inconsistency between the mobile browser version and the chrome River version
Solution:
After downloading the driver consistent with the browser version, replace the driver in appium and start it again.
My appium is installed by default. The driver address is C:\program files\appium\resources\app\node_modules\appium\node_Modules\appium chromedriver\chromedriver\win, enter the win folder to replace the original driver.
Similar Posts:
- Solve the chrome driver error original error: Chrome not reachable
- selenium.common.exceptions.WebDriverException: Message: unknown Error: cannot find Chrome binary
- Mac environment and python + selenium environment are built to solve the error reporting problem of chromedriver
- Selenium Error: Message: unknown error: cannot find Chrome binary
- Chromedriver executable needs to be in path [How to Solve]
- [Solved] Chrome Version Error: Message: session not created: This version of ChromeDriver only supports Chrome version 95
- npm install:[email protected] install: node install.js
- Troubleshooting method for mobile phone automation: original error: the instrumentation process cannot be initialized
- [Solved] Errors reported by genymotion, UI autoviewer and appium
- Appium – multiprocessing.pool.MaybeEncodingError-[“Can’t pickle local object ‘PoolManager.__init…