I am testing mobile website using [AndroidDriver](https://code.google.com/p/selenium/wiki/AndroidDriver). I have to first select language from side menu and then move on to test the search wizard.

What I am doing is, I first click the side menu which shows me a number of options. Then I click the language menu which opens a drop down and I am able to select my preferred language as well.

The issue is that, after I select the language and return to the home page to test further the search wizard, my test crashes saying `Exception in thread "main" org.openqa.selenium.StaleElementReferenceException: WebElement is stale.` I am not able to understand why is this happening. Below is the stack trace

```
Exception in thread "main" org.openqa.selenium.StaleElementReferenceException: WebElement is stale.
For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'localhost', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'armv7l', os.version: '3.4.0-ge09aff8', java.version: '0'
Driver info: driver.version: AndroidWebDriver
Command duration or timeout: 4.04 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:18:15'
System info: host: 'DELC02L605GFFT0.sea.corp.expecn.com', ip: '172.26.46.163', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.2', java.version: '1.6.0_65'
Session ID: 9f47d51d-4dc1-47b3-9219-17ac09335c08
Driver info: org.openqa.selenium.android.AndroidDriver
Capabilities [{platform=ANDROID, javascriptEnabled=true, acceptSslCerts=true, browserName=android, rotatable=true, locationContextEnabled=true, webdriver.remote.sessionid=9f47d51d-4dc1-47b3-9219-17ac09335c08, version=18, handlesAlerts=true, browserConnectionEnabled=true, webStorageEnabled=true, hasTouchScreen=true, applicationCacheEnabled=true, takesScreenshot=true}]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
    at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:268)
    at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:79)
    at org.openqa.selenium.support.ui.Select.setSelected(Select.java:318)
    at org.openqa.selenium.support.ui.Select.selectByValue(Select.java:203)
    at com.pb.crawler.BcomCrawler.main(MyTestClass.java:28)
Caused by: org.openqa.selenium.StaleElementReferenceException: WebElement is stale.
For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'localhost', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'armv7l', os.version: '3.4.0-ge09aff8', java.version: '0'
Driver info: driver.version: AndroidWebDriver
For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:18:15'
System info: host: 'DELC02L605GFFT0.sea.corp.expecn.com', ip: '172.26.46.163', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.2', java.version: '1.6.0_65'
Driver info: driver.version: AndroidWebDriver
    at org.openqa.selenium.android.library.AndroidWebDriver.throwIfError(AndroidWebDriver.java:1015)
    at org.openqa.selenium.android.library.AndroidWebDriver.executeRawScript(AndroidWebDriver.java:895)
    at org.openqa.selenium.android.library.AndroidWebDriver.executeAtom(AndroidWebDriver.java:910)
    at org.openqa.selenium.android.library.AndroidWebElement.isDisplayed(AndroidWebElement.java:392)
    at org.openqa.selenium.android.library.AndroidWebElement.getCenterCoordinates(AndroidWebElement.java:103)
    at org.openqa.selenium.android.library.AndroidWebElement.click(AndroidWebElement.java:131)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:525)
    at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement$1.invoke(EventFiringWebDriver.java:331)
    at $Proxy2.click(Native Method)
    at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.click(EventFiringWebDriver.java:344)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:525)
    at org.openqa.selenium.remote.server.KnownElements$1.invoke(KnownElements.java:63)
    at $Proxy3.click(Native Method)
    at org.openqa.selenium.remote.server.handler.ClickElement.call(ClickElement.java:29)
    at org.openqa.selenium.remote.server.handler.ClickElement.call(ClickElement.java:1)
    at java.util.concurrent.FutureTask.run(FutureTask.java:234)
    at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:170)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
    at java.lang.Thread.run(Thread.java:841)

```

And following is the code am running :

```
AndroidDriver ad=new AndroidDriver();
    System.out.println("Started");
    ad.get("my webpage url");
    Thread.sleep(2000);
    System.out.println("Application Title"+ ad.getTitle());
    ad.findElement(By.id("side_menu_btn")).click();

    ad.findElement(By.id("langList")).click();

    Select select = new Select(ad.findElement(By.id("langList")));
    select.selectByValue("UK");    // line number 28

    Thread.sleep(2000);
    ad.navigate().refresh();

    ad.findElement(By.id("input_destination")).sendKeys("Las Vegas, Nevada, U.S.A");
    new WebDriverWait(ad, 20).until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("li.city"))).click();
    ad.findElement(By.id("ci_date_field")).click();
    ad.findElement(By.id("ci_date_field")).click();
    ad.findElement(By.id("co_date_field")).click();
    ad.findElement(By.id("co_date_field")).click();
    ad.findElement(By.id("submit_search")).click();
    System.out.println("Opened");
    System.out.println("second Title"+ ad.getCurrentUrl());

}

```

Please help me understand the whats wrong here and how to resolve this.