java-client icon indicating copy to clipboard operation
java-client copied to clipboard

mac2 driver instead of mac driver?

Open rreing opened this issue 4 years ago • 2 comments

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! :-)

rreing avatar Feb 09 '21 09:02 rreing

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

mykola-mokhnach avatar Feb 09 '21 12:02 mykola-mokhnach

@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<Mac2Element>, 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

DmitryMishtal avatar May 19 '21 09:05 DmitryMishtal