问题标签 [calabash-ios]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
calabash - calabash-ios 模拟器卡在“启动需要 xxx 秒”
我的模拟器正在启动,并显示成功启动的样子:
除了功能文件没有运行......它只是粘在那里。这可以在simlauncher中吗?或者我的配置搞砸了?
它之前运行正常......然后我运行了其他一些模拟器任务,它似乎不同步。
提前致谢 !
调试信息:
ios - Calabash - 如何将标签中的文本与给定的ID进行比较?
我想对具有给定 id 的标签的 Calabash 查询结果进行断言。但是 Calabash 中似乎不存在“断言”方法。我测试了一个 iOS 应用程序。
我的代码:
这个怎么做?
问候,
米哈乌
ios - uia 操作失败,因为:运行命令 uia.tapOffset 超时
我在运行 Calabash 测试并尝试触摸元素时遇到了一些随机错误
uia action failed because: Timed out running command uia.tapOffset('{:x 187.5, :y 131.5}')
我在Yosemite、Xcode 6.2和iOS Simulator (iPhone 6 iOS 8.1)上运行测试
使用的葫芦版本是0.13.0。
有谁知道它为什么会发生以及如何解决它?
更新
当我说“随机”时,我的意思是有时相同的测试会通过,有时会因为这个错误而失败。我刚刚检查过,在文本字段中输入一些文本后尝试点击选项卡按钮时似乎总是失败。所以我的猜测是当它试图触摸标签按钮时键盘仍然存在
供您参考,这是我为输入文本创建的方法
这些是我使用的safe_touch
和safe_query
方法
更新 2
这是一个有时会失败的场景示例
这是测试失败时的屏幕截图
尝试点击标签栏项目时似乎没有任何障碍......
cucumber - is there a way to select one target when you have more than one calabash target in an iOS project
i have 2 target setup for calabash in my iOS project. i want to know how i can select one target and run cucumber for that target from the console. when i run, cucumber only runs on the app that was most recently built.
ios - Calabash iOS - wait_for_element_exists 不起作用
我尽量避免使用 sleep() 命令,所以我想用更智能的函数替换它,比如 wait_for_element_exists() 但它们似乎在 iOS 下不起作用。例子:
Calabash 不等待屏幕上显示第二个按钮,立即转到第 3 行,测试失败
如果我尝试确定第二个按钮的属性,它立即可用,仍然启用且未隐藏,尽管导航视图控制器尚未完成第一个视图的推送动画:
在此先感谢您的帮助,
米哈乌
ios - calaba.sh-ios 查询所基于的 id 是什么?
当我使用查询在屏幕上提取元素时,它给我的属性之一是 id,但是我找不到决定其值的因素。它不是恢复 ID 也不是对象 ID。在某些地方它与背景图像名称相同,其他地方它是类名,大多数时候它是 nil。
我试图找到 calaba.sh 看到的 id 值,以便我可以在应用程序代码中将其设置为我的测试的唯一标识符,就像我为 android 所做的那样。
ios - 区分Calabsh iOS中的UIScrollViews
我正在使用 Calabash 测试 iOS 应用程序,遇到了命令scroll 'UIScrollView', :down
向下滚动错误视图的问题,因为它找到的第一个视图是 UIPageViewController,而不是其中的滚动视图。
有什么办法可以区分这两种观点吗?基本的 UIScrollView 没有自定义类,我不想仅仅为了测试而创建一个。还有其他选择吗?我在葫芦文档中找不到任何有用的东西。
干杯!
ios - 我在 iOS 上重置模拟器后第一次运行 cucumber 时应用程序崩溃
在 iOS 上重置模拟器后第一次运行 cucumber 时出现以下错误:
第二种情况也失败并出现以下错误:
我做错了什么 - 还是在 xcode 中运行应用程序一次,然后按照应有的方式运行 cucumber?
calabash - 葫芦查询语法中是否有 NOT 运算符?
标题很好地涵盖了我的问题。我如何(例如)获取 ID 不包含“some_prefix”的所有 TextView 元素?我可以获得所有 TextView 元素并对其进行迭代,剔除我不喜欢的元素(我可能会),但我宁愿有一个明确的查询来为我做这件事。
ruby - Share @variable in step_definitions and PageObject methods possible?
Is there an easy way to reference @current_page in both the step_definition.rb files and the PageObject.rb files?
Examples using the @current_page in the Calabash docs force you to always do something like:
After login
you are on a new page and you must pass back a reference to this for the @current_page
. It would be nice to just set @current_page
in the login
method and not have to do that @current_page = @current_page.login(user)
assignment every time you call a method that brings you to a new page.
Is there a good way to do this?