rahul7386 / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

clickOnText(String text, int match) fails on emulator 4.3 #611

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run test having API call to click on second instance of a particular text in 
a screen [Ideally first instance is screen title and second instance is the 
field element]
2.
3.

What is the expected output? What do you see instead?
It should click on the field element having the matching text

What version of the product are you using? On what operating system?
Robotium-solo 5.1

Please provide any additional information below.
In other version of Android emulator, it is working perfectly fine. [Ex: 4.0, 
2.3 etc]
Not sure whether it tries clicking on title instead of second instance, but 
second it just skips this API and goes to next line of code.

Original issue reported on code.google.com by ramda...@gmail.com on 5 Jun 2014 at 4:54

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. Does it work on the 4.4 emulator?

Original comment by renasr...@gmail.com on 6 Jun 2014 at 10:11

GoogleCodeExporter commented 9 years ago
Hi Renas,
 Thanks for quick reply.
 Tried the same tests on 4.4.2 emulator and faced the same problem.
 But same tests passed on 4.2.2 emulator.

 Looks like its breaking from 4.3 onwards.

Original comment by ramda...@gmail.com on 6 Jun 2014 at 3:31

GoogleCodeExporter commented 9 years ago
What happens if you try to decrease or increase the index (the instance number)?

Original comment by renasr...@gmail.com on 7 Jun 2014 at 8:13

GoogleCodeExporter commented 9 years ago
Hi Renas,
 Tested with decreasing instance number, below is the observation :

In 4.3 onwards, Screen title is ignored and index starts on first element in 
the screen with matching text. It means, if a screen has a matching text in 
screen title and in other parts of screen, 4.2 and before, index =1, maps to 
screen title. But  in 4.3, index=1 maps to first matching text in screen [excl 
screen title] which would be identified in 4.2 or earlier version as index=2.

We can temporarily fix it in our scripts by using SDK version and updating 
index, which is not right way.
It will be very helpful, if you can handle it in Robotium code.

Original comment by ramda...@gmail.com on 12 Jun 2014 at 5:44

GoogleCodeExporter commented 9 years ago
Thanks for the information. What Robotium does is to ask the Android platform 
for the Views belonging to the app under test. In this case there seems to be 
differences in the Android versions which results in the title view not being 
available to Robotium in Android 4.3. Unfortunately we can not do anything 
about that. We can only rely on what the platform gives us. 

Original comment by renasr...@gmail.com on 12 Jun 2014 at 5:57

GoogleCodeExporter commented 9 years ago
Thank for Quick comment. We will try to apply customized fix it at our end :(

Original comment by ramda...@gmail.com on 12 Jun 2014 at 6:21