android - 使用 Calablash android 在 Dropbox 登录 webview 中输入用户名和密码

标签 android calabash calabash-android

我正在创建一个预期会在保管箱中登录的测试。因此,该应用程序启动了 Dropbox 登录 Web View 。 与 query("webView css:'input'")我能够检索两个输入:登录名和密码。

当我尝试使用 enter_text(query("webView css:'input'").first,"email@gmail.com") 设置电子邮件字段时我收到错误:

RuntimeError: map {"class"=>"text-input-input autofocus", "nodeType"=>"ELEMENT_NODE", "id"=>"pyxl14", "calSavedIndex"=>5, "html"=>"<input class=\"text-input-input autofocus\" type=\"email\" name=\"login_email\" id=\"pyxl14\">", "textContent"=>"", "rect"=>{"y"=>640, "x"=>52, "center_x"=>540, "height"=>89, "width"=>976, "top"=>220, "left"=>20, "center_y"=>685}, "nodeName"=>"INPUT", "webView"=>"NoResourceEntry-6"}, query failed because: java.util.LinkedHashMap cannot be cast to java.lang.String

知道如何解决这个问题吗?谢谢!

最佳答案

我已经设法设置了文本,它可以工作,但我不明白问题的命令有什么区别。 解决方法是:enter_text("webView css:'input[name=login_email]'", "email@gmail.com")

可能 enter_textquery 不合得来

关于android - 使用 Calablash android 在 Dropbox 登录 webview 中输入用户名和密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37812554/

相关文章:

ruby - 为什么 xamarin 停止支持葫芦

java - 我在客户端上没有收到来自服务器的消息

ios - Cordova 3.4.1和calabash-ios

XSLT 与 XProc - 所需类型中的参数绑定(bind)

android - Jenkins android模拟器插件可创建多个虚拟设备

android - Calabash 步骤检查应用程序是否是第一次运行

使用 calabash-android 时的 Android SDK 路径问题

java - Google Play - onReceivedSslError

android - View 的垂直排序在 CollapsingToolbarLayout 中如何工作?

android - 将单选按钮排列在文本正下方,并完美地位于所有 Android 设备的中心