When i try to run the tests in appium server using android studio emulator, only first test(Preference is clicking) is running as expected and after the control is going back to main menu and opening the application again (i.e from first page) and tries to find the element present in the second test(3. preference dependencies) and throwing me 'NoSuchElementFound' exception, please help me..below is my code Server logs are attched here
Driver();
System.out.println("Opened Emultor :)");
Driver().findElementByXPath("//android.widget.TextView[@text = 'Preference']").click();
Driver().findElementByXPath("//android.widget.TextView[@text = '3. Preference dependencies']").click();
Driver().findElementById("android:id/checkbox").click();
Driver().findElementByXPath("(//android.widget.LinearLayout)[2]").click();
Driver().findElementById("android:id/edit").sendKeys("hello");
System.out.println("Completed");