Objective
The issue of Chrome and Chromedriver versions when switching webview with Appium: Session not created Exception:chrome version must be >= 58.0.3029.0
(Driver info:chromedriver=2.30.477700)
Operating Environment:
Android 7.0
Appium 1.7.1
Appium inside Chromedriver 2.28
WebView version 57.0
Encounter problems
1. When executing the code of Switch_to.context (' Webview_name '), it will be reported that the Chrome browser and chromedriver do not match, the code error message is as follows:
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: session not created exception: Chrome version must be >= 58.0.3029.0 (Driver info: chromedriver=2.30.477700 (0057494ad8732195794a7b32078424f92a5fce41),platform=Windows NT 6.1.7601 SP1 x86_64)
2. View Appium's log, apparently due to a version number mismatch
{"sessionId":"54f24f2451884a7fdcc64fc6480c4a91","status":33,"value":{"message":"session not created exception: Chrome version must be >= 58.0.3029.0\n (Driver info: chromedriver=2.30.477700 (0057494ad8732195794a7b32078424f92a5fce41),platform=Windows NT 6.1.7601 SP1 x86_64)"}}[Chromedriver] Chromedriver exited unexpectedly with code null, signal SIGTERM[Chromedriver] Changed state to 'stopped'[Chromedriver] Unable to automate Chrome version because it is too old for this version of Chromedriver.[Chromedriver] Please see 'https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/chromedriver.md'[Chromedriver] Error: session not created exception: Chrome version must be >= 58.0.3029.0
3. So the question is, will this chrome version be the chrome version on the phone or the chrome version on the computer or the version number of the browser? What is the driver version of this chromedriver?
View WebView Version number
1. For example, WebView version number can be found in Chrome browser, because the use of the X5 kernel, and other apps are not the same, here need to first open the debug mode
Open Debug mode: In Chat interface input: debugx5.qq.com, how to tick "open TBS kernel Inspector debugging function
2. Check the inside WebView version and enter it directly in the PC Chrome browser: chrome://inspect/#devices
Then open the public number page, refresh the browser page, will appear webview version number 57.0
chromedrive Download
1. Find WebView's Chrome version number, then download the corresponding Chromedriver driver package, 57 of the webview corresponding to the 2.28 driver
: Chromedriver version download
Where should I put it after 2.chromedriver download? First find out where the chromedriver=2.30.477700 version of the error is from, replace it. Find path: \node_modules\appium\node_modules\appium-chromedriver\chromedriver\win
After you find the double-click to display the version number, chromedriver=2.30.477700 is the error inside see
Note: The version is different, the path may not be the same, search by yourself: appium-chromedriver
3. Replace the 2.30 version of the Chromedriver.exe with the 2.28 version you just downloaded.
Appium+python Automation 41-switching WebView when Chromedriver version issue is reported