Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change date for DatePicker #264

Closed
renas opened this issue Aug 19, 2015 · 2 comments
Closed

How to change date for DatePicker #264

renas opened this issue Aug 19, 2015 · 2 comments

Comments

@renas
Copy link
Contributor

renas commented Aug 19, 2015

From koneru.s...@gmail.com on November 15, 2011 20:12:54

What steps will reproduce the problem? My app opens a DatePicker dialog when click on a button.
I have to change date after getting hold of DatePicker instance. I can invoke solo.getCurrentDatePickers() to retrieve the DatePicker. But how can I modify the date?

Currently I am doing the following:-

solo.clickOnText("Schedule start time");
solo.clickOnView((Button) solo
.getView(com.ebay.mobile.R.id.button_date_schedule));
solo.waitForText("Set"); // This is to wait till the dataPicker dialog shows up
Log.d(CALL_NAME, Integer.toString(solo.getCurrentDatePickers().size())); // size is returned as 1
solo.getCurrentDatePickers().get(0).updateDate(2012, 1, 25);
solo.clickOnButton("Set"); What is the expected output? What do you see instead? Actual Result:- Throws error as "Only the original thread that created the view hierarchy can touch its views"
Expected Result:- The datePicker should pick the date as provided 2012-01-25 What version of the product are you using? On what operating system? Robotium2.5 Please provide any additional information below.

Original issue: http://code.google.com/p/robotium/issues/detail?id=185

@renas
Copy link
Contributor Author

renas commented Aug 19, 2015

From renasr...@gmail.com on November 15, 2011 21:53:05

Please read the javadoc. You can use setDatePicker()!

Status: Invalid

@renas
Copy link
Contributor Author

renas commented Aug 19, 2015

From koneru.s...@gmail.com on November 16, 2011 07:33:06

Got it, thank you. Don't know how I missed looking at this API..

@renas renas closed this as completed Aug 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant