收藏
回答

微信公众号切换webview失败怎么解决?

java+appium+夜神模拟器7.0.26+微信8.0.23 公众号。 自动点击到webview页面时,driver.getContextHandles() 可以获取到 "WEBVIEW_com.tencent.mm:toolsm"。但我尝试用driver.context()切换时报错。

报错内容为

io.appium.java_client.NoSuchContextException: An unknown server-side error occurred while processing the command. Original error: An unknown server-side error occurred while processing the command. Original error: unknown error: Failed to get sockets matching: @webview_devtools_remote_.*8257

  (make sure the app has its WebView configured for debugging)

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'

System info: host: 'LAPTOP-T2ITR6SI', ip: '132.122.238.136', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_221'

Driver info: io.appium.java_client.android.AndroidDriver

Capabilities {appActivity: com.tencent.mm.ui.LauncherUI, appPackage: com.tencent.mm, databaseEnabled: false, desired: {appActivity: com.tencent.mm.ui.LauncherUI, appPackage: com.tencent.mm, deviceName: 127.0.0.1:62001, noReset: true, platformName: android, platformVersion: 7.1.2, resetKeyboard: true, unicodeKeyboard: true}, deviceApiLevel: 25, deviceManufacturer: samsung, deviceModel: SM-G988N, deviceName: 127.0.0.1:62001, deviceScreenDensity: 480, deviceScreenSize: 1440x2560, deviceUDID: 127.0.0.1:62001, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, noReset: true, pixelRatio: 3, platform: LINUX, platformName: Android, platformVersion: 7.1.2, resetKeyboard: true, statBarHeight: 72, takesScreenshot: true, unicodeKeyboard: true, viewportRect: {height: 2488, left: 0, top: 72, width: 1440}, warnings: {}, webStorageEnabled: false}

Session ID: 6f5230dd-d818-4e84-ab0d-c42c6ee7bbd0。


请问我该怎么解决

回答关注问题邀请回答
收藏

1 个回答

  • 人间烟火冷暖
    人间烟火冷暖
    2023-10-29

    我也出现一样的问题 :python + appium+雷电模拟器 + 微信 8.0.2 + 微信内核是 111.0.5563.116 Mobile + 驱动文件chromedriver=111.0.5563.64

    UnknownError: An unknown server-side error occurred while processing the command. Original error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. Original error: [object Object] unknown error: Failed to get sockets matching: @weblayer_devtools_remote_.*20846

      (make sure the app has its WebView/WebLayer configured for debugging)

      (Driver info: chromedriver=111.0.5563.64 (c710e93d5b63b7095afe8c2c17df34408078439d-refs/branch-heads/5563@{#995}),platform=Windows NT 10.0.22621 x86_64)


    这是什么原因? 有遇到过了吗 ? 怎么解决 ?

    2023-10-29
    有用
    回复
登录 后发表内容