【问题标题】:NATIVE_APP context are showing on a hybrid Android app which is using Cordova , when trying to automate using Appium当尝试使用 Appium 进行自动化时,NATIVE_APP 上下文显示在使用 Cordova 的混合 Android 应用程序上
【发布时间】:2016-12-08 04:05:15
【问题描述】:
    def test_list_content(self):
      self.driver.implicitly_wait(600)
      time.sleep(10)
      allContexts = self.driver.contexts
      print allContexts
      current = self.driver.current_context
      print current

Appium 版本为 1.4.16.1,Windows 7,操作系统为 4.4.2 的 Android 设备。

我正在使用混合应用程序,而 Appium 仅返回 NATIVE_APP 上下文。我可以在 chrome 检查器中看到该应用程序,并且能够使用它单击 Web 元素,但使用 Appium 我无法切换到 Web 视图,因为 appium 无法在屏幕上找到元素。

请帮助我如何自动化这种 Android 应用程序

【问题讨论】:

  • 问题!您是否在混合应用程序中使用 Crosswalk?通常这会导致找不到 webview 的问题。
  • @MadisKangro,是的,我们的应用程序中存在人行横道

标签: android python automation appium


【解决方案1】:

这是 Crosswalk webviews 的问题。他们有点不同。这还没有在 appium 中修复。问题在这里 Appium issue with Crosswalk webviews.

但是这里有解决该问题的方法。按照那里的说明进行操作,然后它应该可以工作。我确实尝试过,它对我有用。 webview 名称与往常略有不同。 Crosswalk workaround for appium

【讨论】:

    猜你喜欢
    • 2014-08-17
    • 2018-04-29
    • 1970-01-01
    • 1970-01-01
    • 2014-09-25
    • 2019-05-01
    • 2017-05-14
    • 2021-10-11
    • 2021-06-27
    相关资源
    最近更新 更多