Looks like the calabash pre-defined steps are not enough for my usage.
My scenario is this:
- If user 1st time login, my app pops up a view which contains EditText
field ask user to input an nickname, then user input the name e.g. "John" and press OK button, then my app popup a view contain text "Ready to go".
- If user is not the 1st time login, my app pops up a view which contains text "Ready to go"
(In my app code, I check if there is unique id persisted, if not, it is 1st time login)
I might be wrong but I guess I need to write my own step definition in Ruby for this scenario, I looked at the sample code below:
Then /^I see the text "([^\"]*)"$/ do |text|
macro %Q|I should see "#{text}"|
I get lost. My questions are:
Q1. Is it possible to invoke Android SDK API from calabash so that I can also check if this is 1st time login or not from ruby code?
Q2. If the answer for above question is no, how can I use calabash to test my case if the view could be different when login 1st time vs Not 1st time login. (Imaging I need to run the test on some devices multiple times, the 1st time login view is different than the rest times)