0

I am running calabash test cases on Android simulator. My test cases work fine on device, But on simulator, when I execute a touch button action. It does not auto scroll downwards, to find the text. It simply checks on the visible screen area, and does not execute. Whereas on device it auto scrolls. I am using a 2.3.3 simulator.

Please help!!

Mayur More
  • 951
  • 2
  • 15
  • 37
  • I have found that it still works fine when the emulator is run on Windows & machine. But has issues on Windows 2008 machine. That's strange... – Mayur More Sep 04 '14 at 12:45

2 Answers2

0

It is not clear to me what simulator you are using. But if you are not already using Genymotion. You could give it a try. It runs really quick and the tests I am running are running fine on it.

Lasse
  • 1,153
  • 1
  • 10
  • 21
  • Hi Lasse, I am working on making the whole process automated, right from making the build, launching the emulator, installing and running test cases. Can we launch the Genymotion emulator through command prompt? – Mayur More Sep 05 '14 at 07:38
  • Yes you can. Krazyrobot has a really nice guide http://krazyrobot.com/2014/05/calabash-genymotion-and-jenkins/ – Lasse Sep 05 '14 at 11:13
0

The issue was that I was running the test cases on a remote virtual machine, which supposedly has issues with UI rendering. I solved it by modifying the calabash touch method as follows :

def touch_event(text)
        q = query("* text:'#{text}'")

        while q.empty?
            scroll('down')
            q = query("* text:'#{text}'")
        end 

        touch("* text:'#{text}'")
end
Mayur More
  • 951
  • 2
  • 15
  • 37