Reputation: 773
I am using Appium for automating my Android app. I have a fragment to enter email and after verifying that second fragment with passwordfield
will be loaded. I am able to find all elements in the first fragment; but elements in the second fragment can't be found using any of the methods like By
, PageFactory
+ @AndroidFindBy
. Can someone provide a help to sort this issue?
Upvotes: 2
Views: 451
Reputation: 2526
Use ExplicitWait method.
public static void ExplicitWait(MobileElement element){
(new WebDriverWait(driver,30)).until(ExpectedConditions
.elementToBeClickable(element));
}
then before you use element of second fragment call ExplictWait
ExplictWait(passwordField);
passwordField.sendKeys("your password");
Upvotes: 2