Closed GoogleCodeExporter closed 9 years ago
That is according to design. If the component is not visible on the screen then
you can not interact with it. What you need to do is to scroll down until it is
visible on the screen. So add scrollDown() between clickOnButton(0) and
enterText(5, "Visible").
Original comment by renasr...@gmail.com
on 22 Sep 2011 at 8:02
Ok.
I have a few questions regarding the design.
If I scroll down will the index change depending on how many EditText are
presently on screen?
The issue arose when using the same test on two devices with different screen
sizes.
So a given EditText might be off screen depending on screen resolution and it
will be difficult to determine the correct index because it depends on screen
size/resolution.
I will probably try and add functionality that solves my current issue.
That is: A variant of "solo.enterText" where the indexes are independent of
what EditTexts are currently on screen.
The variant should ensure that the EditText is on screen before entering text
into it.
Would you prefer a solo.enterText variant with a extra parameter or a new
method name?
I will issue a pull request when its done and you can see if its something you
would like to pull into master.
Thanks for the prompt reply.
Original comment by erik.mej...@gmail.com
on 22 Sep 2011 at 11:34
The design was implemented to make the various solo methods behave similar on
ScrollViews and ListViews. The views in ListViews only exist if they are shown
on the screen. So if an EditText needs scrolling to be shown in a ListView then
Robotium will not know that it exists until it is actually shown on the screen.
Original comment by renasr...@gmail.com
on 22 Sep 2011 at 3:01
Hi,
I face the same problem. Robotium says Unable to find item when EditText is
offscreen in scroll view. when I scroll drown then index of EditText is
changing. I cant even access them with R.id because they are generated
programmatically
Please Help.
Thank you.
Original comment by bhanu7...@gmail.com
on 9 May 2014 at 10:43
@bhanu, what methods are you using? If you use enterText() then it will
automatically scroll until it finds the EditText.
Original comment by renasr...@gmail.com
on 9 May 2014 at 11:33
Hi,
Thank you for your quick response. ya I am using enterText() method but it take
index as one of its parameters rite??
for example. Here is my code
if(solo.searchText("Address")){
solo.enterText(4, "Address");
}
I cant fill Address in Address edittext
Original comment by bhanu7...@gmail.com
on 9 May 2014 at 11:41
You should remove the searchText and just use enterText.
Original comment by renasr...@gmail.com
on 9 May 2014 at 11:51
I can Scroll to that particular EditText but unable to fill values in it
because it changes its EditText index. The EditText which is at 5th place
should have index as 5. but as the screen is scrolling the index is changing to
1. when I tried to enter value in 5th EditText by giving its index as 1 is
working fine but I cant do this for all controls because I cant predict the
exact index of the controls after the screen is scrolledup.
Please help I am unable to go further.. I am just stucked.
Thank you.
Original comment by bhanu7...@gmail.com
on 9 May 2014 at 11:58
No.. I am sorry if I dont use searchText() I cant find the item which is
offscreen.
Original comment by bhanu7...@gmail.com
on 9 May 2014 at 12:00
So enterText does not scroll until it finds the edit text?
Original comment by renasr...@gmail.com
on 9 May 2014 at 12:39
yeah...
Original comment by bhanu7...@gmail.com
on 9 May 2014 at 12:49
Would it be possible for you to send me your apk?
Original comment by renasr...@gmail.com
on 9 May 2014 at 12:50
hmmmm.... sorry I cant send it..
Original comment by bhanu7...@gmail.com
on 9 May 2014 at 1:01
Hi,
Can you please give me any solution for that. Actually please tell me are there
only two ways to access an element in Robotium.?? one with index and the other
with R.id...
Is there any way to access elements rather than these two ways??
Please Help,
Thank you.
Original comment by bhanu7...@gmail.com
on 12 May 2014 at 11:34
Original issue reported on code.google.com by
e...@lesspainful.com
on 21 Sep 2011 at 11:10Attachments: