appium / appium-for-mac

[deprecated] Application for automating a mac app with JSON wire protocol
Apache License 2.0
193 stars 70 forks source link

Unable to click or tap on images. perform() method not supported in appium for mac. #98

Closed vijayqa closed 4 years ago

vijayqa commented 4 years ago

Hi, We are trying to automate Mac standalone application developed in Xamarine platform, For check boxes and radio buttons they have used images. We are unable to perform tap option since .perform() method is not supported. getting unsupported command exception. org.openqa.selenium.UnsupportedCommandException: For trying to click() on image, getting webDriver exception. Below is the sample xpath. driver.findElement(By.xpath("/AXApplication[@AXTitle='Plugged']/AXWindow[@AXTitle='E plugged' and @AXSubrole='AXStandardWindow']/AXImage[@AXIdentifier='chkBoxTermsAndCondition']")).click();

vijayqa commented 4 years ago

This worked for me, https://github.com/appium/appium-for-mac/issues/80

This root cause is this repository does not support /actions for send keys to the active elements command as W3C yet. Java client sends the /actions as the command instead of session/:session_id/keys. session/:session_id/keys is MJSONWP.

As a workaround in Java client, you can try forceMjsonwp as appium/java-client#969 (comment) . Then, Java client works as MJSONWP.

KazuCocoa commented 4 years ago

ah, okay. Thanks for leaving the solution