Answer the question
In order to leave comments, you need to log in
How to work with objects in calabash-cucumber?
Hello community!
In the process of studying calabash-cucumber for testing mobile applications, the question arose of how to work with objects. I took an iOS application for testing, and here on one of the Activities there are 4 questions and 3 answers for each question. To pass to the next Activity, you need to answer these questions, and the answer is the option mark opposite the question. The drawing looks something like this:
|1|0|0| or |1|0|0|
|0|1|0| or |1|0|0|
|0|0|1| or |1|0|0|
|1|0|0| or |0|0|1|
class Tapper
def tap(x, y)
perform_action('click_on_screen', x, y)
#or touch(nil, {:offset => {:x => x.to_i, :y => y.to_i}})
end
end
Then /^I touch on screen $/ do |x, y|
@answer_1_1 = Tapper.new
@answer_1_1.tap(802, 153)
end
undefined step
undefined method 'perform_action' for Object
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question