sangmingming / robotium

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

Fragment in viewpager- button click issue #242

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.place a button on a fragment inside a viewpager.
2.Try to get access of that button and click it.
3.

What is the expected output? What do you see instead?
expected output:Button should get clicked and should take us to next state of 
application.

currently i am facing error:- Method invocation Error.
i tried accessing the button using 
1)clickOnButton (int Index).
2)clickOnButtonByName (String ButtonName).
3)ClickonText(String text ).
4)set focus on button  &  keydown
5)Trying to access button by virtual keyboard.
6)sendKeys.

I tried to get the access of FragmentManager using Activity context.
As i am developing a systemTest Project i donot have access to application 
resouces and i want to make it code independent as much as possible.

What version of the product are you using? On what operating system?
robotium 3.1
windows 7

Please provide any additional information below.

Original issue reported on code.google.com by saintke...@gmail.com on 30 Mar 2012 at 10:38

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. Would it be possible for you to supply a sample 
project which exhibits this behavior? 

Original comment by renasr...@gmail.com on 31 Mar 2012 at 12:02

GoogleCodeExporter commented 9 years ago
Please see: Why do text and button clicks get wrong?

http://code.google.com/p/robotium/wiki/QuestionsAndAnswers

Original comment by renasr...@gmail.com on 6 Apr 2012 at 10:43

GoogleCodeExporter commented 9 years ago
hi renas, 
extreamly sorry for a delayed reply.I went throught thr link which you provided 
but it didnt work for me. I have created a sample app and attached it which is 
similar to the app on which i need this scenario to work. please find the 
attachment.Can you please re open this bug and give me a fix for clicking the 
button.

Original comment by saintke...@gmail.com on 10 Apr 2012 at 2:18

Attachments:

GoogleCodeExporter commented 9 years ago
The following works:

Please see: Why do text and button clicks get wrong?

http://code.google.com/p/robotium/wiki/QuestionsAndAnswers

I have tried it on the sample project that you have sent and all buttons are 
clicked correctly.

Original comment by renasr...@gmail.com on 10 Apr 2012 at 5:13