Closed renas closed 9 years ago
From renasr...@gmail.com on May 03, 2012 22:30:33
What happens if you remove solo.clickOnEditText()?
From Surhum...@gmail.com on May 07, 2012 00:42:34
it fills it into the first edittext, but not into the second.
From renasr...@gmail.com on May 07, 2012 00:59:17
Would it be possible for you to send me an application that exhibits this problem?
From Surhum...@gmail.com on May 07, 2012 01:06:05
That I'm affraid isn't possible, I can give you some snippets and or screenshots. The whole app also requires account etc. Which isn't free to create.
From renasr...@gmail.com on May 07, 2012 01:09:49
Do you get an error message (EditText with index 1 can not be found) when trying to fill in the second edit text field?
From Surhum...@gmail.com on May 07, 2012 01:22:09
Besides the "Next assert failure" I only get an IntentLeak error (at the same time, think it is because of the assertfailure) But here it is:
05-07 10:19:01.255: E/WindowManager(4438): Activity dk.mobile.basket.order.OrderActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@41337558 that was originally added here
05-07 10:19:01.255: E/WindowManager(4438): android.view.WindowLeaked: Activity dk.mobile.basket.order.OrderActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@41337558 that was originally added here
05-07 10:19:01.255: E/WindowManager(4438): at android.view.ViewRootImpl.
From renasr...@gmail.com on May 07, 2012 01:24:32
What do you get if you run this command before trying to enter text into the fields?
Log.d("Robotium", "number of edit texts: " + solo.getCurrentExitTexts().size());
From Surhum...@gmail.com on May 07, 2012 01:31:14
05-07 10:27:52.370: D/Robotium(4918): number of edit texts: 1
Hmm that sure explains it :-/ There is 2 on the screen though
From renasr...@gmail.com on May 07, 2012 01:34:02
Can you please attach a screenshot?
From Surhum...@gmail.com on May 07, 2012 01:38:19
Of cause. :-) actually 7, Navn, : is 3 different edittexts (enabled=false) aswell though.
Attachment: roboSS.png
From renasr...@gmail.com on May 07, 2012 01:44:11
Does the second edit text field belong to the same process? Can you click it with any of the click methods?
From Surhum...@gmail.com on May 07, 2012 01:49:25
I fail to see what you mean, if it belongs to the same process. It is created at the same time as the first one (with 12345). I had clickOnEditText(i) in it before, that was not possible to click on no.2.
How can i else try and click on it?
From renasr...@gmail.com on May 07, 2012 01:53:34
If you have the source code to the application you can use solo.clickOnView(solo.getView(R.id.x)) or if you have the location, you can use solo.clickOnScreen(int x, int y).
If you check with hierarchyviewer, are you sure that the second component is indeed an EditText field?
From Surhum...@gmail.com on May 07, 2012 02:05:30
They are both an inheritance of EditText yes. (All under Reference is created from the same class, extended from EditText).
I dont have the id, since i add them programmaticly. I can try and add the clickonscreen, but it just isn't sustainable when I would like to test it on multiple devices :-). But i'll try it for this bugfinding
From Surhum...@gmail.com on May 07, 2012 02:15:34
The clickOnScreen(158,426) worked, it targeted the location of the referenceField. And displayed the keyboard and my custom popup :-)
From renasr...@gmail.com on May 07, 2012 02:21:36
That is strange. Then it should find it.
I have emailed you the latest snapshot of Robotium. Can you please try with the new jar and see it the problem exists also there?
From Surhum...@gmail.com on May 07, 2012 02:38:52
Okay update, I missed something before. It does click the inheireted edittext, and it does act appropriately. But it also says:
05-07 11:36:15.945: I/TestRunner(7267): junit.framework.AssertionFailedError: Click can not be completed!
(didnt see if it said it with the released, but defently does with the snapshot you sent me)
From renasr...@gmail.com on May 07, 2012 02:42:34
Is the keyboard in the way? Please try to use solo.goBack() after clicking the edit text field. As the keyboard does not belong to your application a security exception is sent when you try to click it. That is why you are getting the AssertionFailedError.
From Surhum...@gmail.com on May 07, 2012 02:48:07
click it, goback, and what? i cant enter text into it without having it in an ID or in some kind of variable, can I ? :-)
Ps. Trying to get a testproject with the necessities up and running that I can send to you :-)
From renasr...@gmail.com on May 07, 2012 02:50:38
The issue you are experiencing is that probably the keyboard is blocking the EditText. So you need to make the keyboard dissappear. A way to do that is by the use of solo.goBack() (when the keyboard is shown). So if you click on the edit text field, the keyboard is shown, you use goBack() to make the keyboard disappear and then use solo.enterText(1, "12345");
From Surhum...@gmail.com on May 07, 2012 03:01:30
But it doesn't block it unless I click it. And the Array is only 1 big, which means that it only tries to insert the text into the first field, and not the second, or am I mistaken? the 12345 is getting inserted in the first field. it is the second field that it doesn't get too, and therefore can't insert into it.
Else I would need a method called insertTextInPreTargetedBox(String str), if I'm not mistaken?
From Surhum...@gmail.com on May 07, 2012 03:54:16
Anyways tried it with: for(int i=0; i<edts.size();i++){ solo.enterText(i, "12345"); solo.clickOnScreen(158, 425); solo.goBack(); solo.enterText(i, "asdfghjklæpoiuytrewq"); solo.sleep(1000); } No difference. I made my testproject, where there is no tabviews, headers, footers. There it works. Any ideas? :)
From renasr...@gmail.com on May 07, 2012 05:29:59
No idea why you are encountering this issue. I hope you will be able to reproduce it in your test project :)
From renasr...@gmail.com on May 29, 2012 13:05:22
Will open up the issue when new information is provided.
Status: Invalid
Owner: renasr...@gmail.com
From Surhum...@gmail.com on May 01, 2012 07:50:38
What steps will reproduce the problem? 1. create extended class of EditText, with a popupwindow inside it.
Original issue: http://code.google.com/p/robotium/issues/detail?id=256