appium / java-client

Java language binding for writing Appium Tests, conforms to W3C WebDriver Protocol
Apache License 2.0
1.21k stars 756 forks source link

mac2 driver instead of mac driver? #1440

Open rreing opened 3 years ago

rreing commented 3 years ago

Hi

I took a look at this: Appium Docs and found: "Appium has beta support for automation of OS X desktop applications. Development of this driver happens at the appium-mac-driver, and relies on a native OS X binary called AppiumForMac."

But when i open either of project i see "Please consider switching to appium-mac2-driver for over macOS 10.15". And there is no app called AppiumForMac with releases like this: releases So i don't know how to proceed with appium for mac 2

Do you have any doc with step-by-step examples i can start from? Thanks!

Update: Ok i successfully used mac2 driver instead of mac driver! :-)

mykola-mokhnach commented 3 years ago

https://github.com/appium/java-client/pull/1439

DmitryMishtal commented 3 years ago

@mykola-mokhnach

Java client version: 7.5.1 Appium version: 1.21.0

Hello Mykola,

Seems like something wrong with Mac2 driver (or i've made a mistake?), but if i search element through Mac2Driver, i cannot cast found element into Mac2Element and getting ClassCastException (in debug i can see RemoteWebElement was found)

For example, code:

By locator = By.id("LoginLoginField");
Mac2Element element = driver.findElement(locator);

is throwing:

java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebElement cannot be cast to io.appium.java_client.mac.Mac2Element
    at com.company.page.setLogin(LoginPage.java:36)
    at com.company.page.login(LoginPage.java:113)

where driver is:

Mac2Driver<Mac2Element> driver

I cannot init PageFactory with Mac2Elements ether