How to scroll to the last item?

I need to logout from the facebook app, so need to scroll down to the last item. What is the best way of doing that?
I have tried the scrollTo(name) method (in java_clinet-2.0.0) which takes the name/description of the item. In my case this is language dependent, so I rather not use that (as it will be different name depending on the language settings on the phone).

Any suggestions?

Use the xpath for the element, it won’t change wiht the language settings; then click on it, you don’t need to scroll down to that element to do the click.

driver.findElement(By.xpath("//pathtologoutbutton")).click();

I will try that. thanks!

However, will the driver.findElement(…) still find it, even it it is currently not visible on the screen? Don’t I need to scroll down first so it is visible on the screen?

/Alex

It will be enabled even if not visible.
If you want, you can check using: driver.findElement(By.xpath("//pathtologoutbutton")).isEnabled;