How to use Fluent wait in appium?

Wait wait = new FluentWait(appiumDriver) .withTimeout(10, TimeUnit.SECONDS) .pollingEvery(250, TimeUnit.MILLISECONDS) .ignoring(NoSuchElementException.class) .ignoring(TimeoutException.class); wait.until(ExpectedConditions.visibilityOfElementLocated (By.id(“text1”)));

How to get specific cookie information

Cookie cookie = driver.manage().getCookieNamed(“1P_JAR”); System.out.println(“Name : ” + cookie.getName()); System.out.println(“Value : ” + cookie.getValue()); System.out.println(“Domain : ” + cookie.getDomain()); System.out.println(“Path : ” + cookie.getPath()); System.out.println(“Expiry : ” + cookie.getExpiry()); System.out.println(“Secure …

How to get all cookies information in Appium

Set cookies = driver.manage().getCookies(); for(Cookie cookie: cookies) { System.out.println(“Name : ” + cookie.getName()); System.out.println(“Value : ” + cookie.getValue()); System.out.println(“Domain : ” + cookie.getDomain()); System.out.println(“Path : ” + cookie.getPath()); System.out.println(“Expiry : …

How to check if current Orientation is Portrait?

public boolean Method_isCurrentOrientationPortrait(AppiumDriver driver) { String ort = driver.getOrientation().name(); ScreenOrientation orientation = ScreenOrientation.valueOf(ort); if (orientation == ScreenOrientation.PORTRAIT) { return true; } else { return false; } }