Appium java-client 8.0.0-beta has been released

Hello,

we are happy to announce that recently the new beta of the next major Java client library version has been released. This version includes full support of Selenium 4, strictly supports W3C protocol and has a couple of other important changes that we have described in the Migration Guide document. Please read this document carefully to successfully migrate your existing codebase.

Many thanks to all people that made this release possible:

Please try the new release and share your feedback if you encounter any unexpected issues there.

1 Like

I am using Selenium 4.0 with Appium 8.0.0-beta. Getting error for type MobileElement. I have this code -
public AppiumDriver driver; What is the solution for this?

@Abhay_Bharti Not sure if this is late but with Appium 8.0.0 already released MobileElement as AndroidElement and iOSElement are removed. You should only use WebElement in Appium

1 Like

Hi migrated to java-client 8 and I’m trying to figure out what is the replacement for these imports?

import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.Wait;

I used these lines of code to check if the alert is present:

public boolean isAlert() {
try {
return ExpectedConditions.alertIsPresent().apply(driver) != null;
} catch (Exception e) {
return false;
}
}

And:

final Wait wait = new AppiumFluentWait<>(el, Clock.system(ZoneId.systemDefault()), duration -> {
Thread.sleep(duration.toMillis());
}).withPollingStrategy(AppiumFluentWait.IterationInfo::getInterval)
.withTimeout(ofSeconds(time))
.pollingEvery(ofMillis(500));

switch (attribute) {
case IS_DISPLAYED:
return wait.until(SearchedElement::isDisplayed);
case IS_PRESENT:
return wait.until(SearchedElement::isPresent);
case IS_CLICKABLE:
return wait.until(SearchedElement::isClickable);
case IS_DISAPPEARED:
return wait.until(SearchedElement::isDisappeared);
case TEXT:
return wait.until(SearchedElement::text);
case IS_TAPPED:
return wait.until(SearchedElement::isTapped);
case IS_SELECTED:
return wait.until(SearchedElement::isSelected);
case ALERT:
return wait.until(SearchedElement::isAlert);
case IS_ENABLED:
return wait.until(SearchedElement::isEnabled);
default:
return false;

How can I replace these commands?

Hi all,

Recently I changed appium -Java client 8.2.0 and selenium 4 &appium 2.I’m getting below error anybody know how to resolve this?

error: cannot access HasInputDevices
public WebDriver driver = ((WebDriverFacade) facade).getProxiedDriver();
^
class file for org.openqa.selenium.interactions.HasInputDevices not found

https://stackoverflow.com/questions/48718198/error-cannot-access-org-openqa-selenium-hasinputdevices-class-file-not-found