Reputation: 11071
How to automatically scroll a WebView down to bottom in Robotium?
We use a WebView to disaply EULA by the way.
Upvotes: 1
Views: 1045
Reputation: 1
First answer is work, but it's not flexible
I think you can override the methond
clickOnWebElement(By by, int match, boolean scroll){}
write
solo.sendkey(Solo.DOWN);
into it
Upvotes: 0
Reputation: 1975
I've found that clicking on the view, then pressing the Down key some set number of times can do what you want. So something like:
solo.clickOnView(getActivity().findViewById(R.id.your_eula_webview_id));
for (int i=0;i<20;i++) {
solo.sendKey(Solo.DOWN);
}
If that doesn't work, try finding something that does using the keyboard on the emulator, and then do the same with Robotium.
Upvotes: 1