Cannot use ImageComparison on MacOS apps
See original GitHub issueThe problem
I’m developing tests for an app, which is rendered in Unity - this means I cannot simply locate elements. Therefore, I’m limited to using image recognition. This works great on Android, but when I try to use it on macOS desktop app, I get: org.openqa.selenium.UnsupportedCommandException: Could not find selector (post_appium_compare_images:data:) for path ‘/session/3aUyAV7O/appium/compare_images’.
The app is launched correctly, it’s at the time of looking for the image that I get this error.
Environment
- Appium version (or git revision) that exhibits the issue: 1.17.1
- Last Appium version that did not exhibit the issue (if applicable): N/A
- Desktop OS/version used to run Appium: macOS 10.15.5 Catalina
- Node.js version (unless using Appium.app|exe): 14.2.0
- Npm or Yarn package manager:
- Mobile platform/version under test:
- Real device or emulator/simulator: real device
- Appium CLI or Appium.app|exe: appium CLI
Details
Using ImageComparison features on macOS results in an error:
org.openqa.selenium.UnsupportedCommandException: Could not find selector (post_appium_compare_images:data:) for path '/session/0s06VdvH/appium/compare_images'.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'Dariuszs-iMac.local', ip: 'fe80:0:0:0:14b6:fa0a:b020:2ec%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.5', java.version: '14.0.1'
Driver info: io.appium.java_client.AppiumDriver
Capabilities {app: Teooh - Build, deviceName: Mac, javascriptEnabled: true, newCommandTimeout: 300, platform: MAC, platformName: Mac}
Session ID: cc1ca97f-f799-4dbf-bd49-b76c9ce65366
Link to Appium logs
https://gist.github.com/dariuszteooh/20ef2601131734b7fb7822e4eb26b267
Code To Reproduce Issue [ Good To Have ]
OccurrenceMatchingResult result = driver .findImageOccurrence(screenshot, loginPage.getRefImageBytes("email_field.png"), new OccurrenceMatchingOptions() .withEnabledVisualization() .withThreshold(0.7)); Assert.assertTrue(result.getVisualization().length > 0); Assert.assertNotNull(result.getRect()); result.storeVisualization(new File("occurrence_email.png"));
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top GitHub Comments
https://github.com/appium/appium-mac-driver/blob/4b65e6fb4723f987af5941a0139b5b18cbc4d77b/lib/driver.js#L15
This should work in appium-mac2-driver