Closed mwasilew closed 9 years ago
Thanks for reporting it. The difference between the backends is certainly a problem. I would need your help in order to identify the problem and provide the solution. I don't think AndroidViewClient is manipulating the given coordinates a lot, so the possibility also exists that the problem be in ViewServer as well or for some reason the coordinates obtained are relative to a different window. For starters, the number of Views dumped greatly differs between both.
It would be great if you can include a screenshot of the Vellamo screen you are using so we can run the same tests. I'm using VELLAMO 3.1.
I found one way of exposing the problem. If you connect adb
to your device (or run your emulator) and then:
$ culebra -uG
and
$ culebra -FuG
both at the same time you'll have 2 windows showing the device.
Then, press CTRL+Z on both (to show target zones) you may end up with different zones highlighted in both windows.
I tried both culebra calls and there is no difference. I'm stuck in the EULA screen of Vellamo 3.1.
CTRL+Z doesn't highlight anything on this screen unfortunately. I checked it with home screen on this device and on Nexus 7. I'm getting pretty colourful rectangles there, but not in this dialog.
Note: I managed to get back on track by disabling animations in Vellamo. UIAutomator doesn't complain about too frequent refreshes any more.
I tried culebra
on the EULA screen and it works for me. When I click on
ACCEPT the line generated in the script is (notice the difference is
case):
self.vc.findViewWithTextOrRaise(u'Accept', root="ROOT").touch()
which of course follows a
self.vc.dump(window=-1)
On Wed, Jan 14, 2015 at 11:23 AM, mwasilew notifications@github.com wrote:
I tried both culebra calls and there is no difference. I'm stuck in the EULA screen of Vellamo 3.1. [image: vellamo1] https://cloud.githubusercontent.com/assets/618901/5742353/4f65ef20-9c09-11e4-9536-6acae9374b3b.png
CTRL+Z doesn't highlight anything on this screen unfortunately. I checked it with home screen on this device and on Nexus 7. I'm getting pretty colourful rectangles there, but not in this dialog.
Note: I managed to get back on track by disabling animations in Vellamo. UIAutomator doesn't complain about too frequent refreshes any more.
— Reply to this email directly or view it on GitHub https://github.com/dtmilano/AndroidViewClient/issues/127#issuecomment-69943096 .
Have you read my blog ? http://dtmilano.blogspot.com android junit tests ui linux cult thin clients
So are you getting the colourful rectangles on EULA screen when pressing CTRL+Z in culebra (with GUI) ? The culebra window is larger than my screen. Maybe this is the reason. On the other hand I'm getting the rectangles on other views.
If the window is larger use --scale=float
option, for example
--scale=0.5
On Thu, Jan 15, 2015 at 9:26 AM, mwasilew notifications@github.com wrote:
So are you getting the colourful rectangles on EULA screen when pressing CTRL+Z in culebra (with GUI) ? The culebra window is larger than my screen. Maybe this is the reason. On the other hand I'm getting the rectangles on other views.
— Reply to this email directly or view it on GitHub https://github.com/dtmilano/AndroidViewClient/issues/127#issuecomment-70092249 .
Have you read my blog ? http://dtmilano.blogspot.com android junit tests ui linux cult thin clients
When trying to automate one of the apps, I encounter the problem with UIAutomator: view refreshed too frequently. After googling for a while I found a hint encouraging to use ViewServer instead of UIAutomator. The problem is that I'm getting different widget coordinates when using ViewServer. This means taps are not happening in correct places and automation doesn't work. Example when using dump:
UIAutomator case
ViewServer case
It also seems the layout is slightly different.
Using 'tap input' with first set of coords (from UIAutomator) works fine. The second set doesn't work. I'm using Vellamo 3 as example. It's running on Nexus 10. Any hints how to soleve/fix it?