我正在尝试学习如何为 frank 编写测试脚本(黄瓜测试脚本)。
这是我写的
When I navigate to "aaa"
Then I should be on the aaa screen
Then I navigate to "bob"
Then I should be on the bob screen
When /^I navigate to "(.*?)"$/ do |aaa|
touch "view:'UITabBarButton' marked:'aaa'"
END
Then /^I should be on the aaa screen$/ do
check_element_exists "view:'UIImageView' marked:'xxx'"
END
Then /^navigating to "(.*?)"$/ do |bbb|
touch "view:'UITabBarButton' marked:'bbb'"
end
Then /^I SHould be on the bbb screen$/ do
check_element_exists "view:'UIImageView' marked:'zzz'"
end
写字母而不是视图/图片名称的位置
这是我在运行脚本时得到的
/Users/janogrodowczyk/SMHI/ios/ios/Frank/features/step_definitions/test_steps.rb:14:语法错误,意外$end,期待kEND(SyntaxError)
而且我不知道自前两行以来我做错了什么
When I navigate to "aaa"
Then I should be on the aaa screen
只有在没有其余部分的情况下运行它们时,它们才能正常工作。
此致