如何解决“在W3C模式下不能调用非W3C标准命令"在自动化android webView的情况下 [英] How to resolve "Cannot call non W3C standard command while in W3C mode" in case of automating android webView

查看:120
本文介绍了如何解决“在W3C模式下不能调用非W3C标准命令"在自动化android webView的情况下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在执行android webView自动化.从本机应用程序上下文更改为Webview上下文后,出现以下错误.

I am doing an android webView automation. After changing from native app context to webview context, I am getting the following error.

org.openqa.selenium.UnsupportedCommandException: unknown command: Cannot call non W3C standard command while in W3C mode

有许多与此相关的类似问题,但都与网络有关.我在android webView中找不到解决此问题的任何解决方案.谁能告诉我如何解决这个问题.

There are many similar questions related to this but all are related to web. I couldn't find any solution to solve this in android webView. Can anyone please let me know how can I solve this.

环境:

  1. 移动版本:5.1.1
  2. Appium版本1.15.1
  3. chromeDriver版本:78.0.3904.70
  4. Chrome Verison:78.0.3904.62

推荐答案

最终找到了解决方案.我只是使用了以下功能.

Finally found the solution. I just used the below capabilities.

capabilities.setCapability("appium:chromeOptions", ImmutableMap.of("w3c", false));

这篇关于如何解决“在W3C模式下不能调用非W3C标准命令"在自动化android webView的情况下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆