我想使用 calabash/cucumber 来测试我的 android 应用程序,我想知道为什么我找不到有关如何在场景中使用国际化字符串的信息。
Android 将 R.string.*
与一个或多个 xml 文件和 ID 一起使用,以识别正确的 View 。
是否可以在 Calabash 中使用类似的东西?
Given I see R.string.hello_world
Given i enter R.string.hello_world into inout field with id R.id.input_1
最佳答案
我相信您正在寻找的功能没有实现。但是,calabash 通过以下宏支持国际化:
Then /^I press text of translated l10key (\d+)$/
Then /^I press button of translated l10key (\d+)$/
Then /^I press menu item of translated l10key (\d+)$/
Then /^I press toggle button of translated l10key (\d+)$/
Then /^I wait for the translated "([^\"]*)" l10nkey to appear$/
更多详情 here
关于android - Calabash Cucumber 字符串国际化 (R.string.*) 和使用 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20884746/