question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use ImageComparison on MacOS apps

See original GitHub issue

The 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:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

7 free ways to compress images on Mac
1. Reduce image file size by changing their format · 2. Compress file size by resizing image · 3. Compress photos using right-click...
Read more >
Get help with the Photos app on your Mac
If Photos for macOS won't open or isn't performing as expected, try these tips.
Read more >
wdio-image-comparison-service
IMPORTANT! This module will execute a pixel-by-pixel comparison for you. There are some things you can change during comparison, ...
Read more >
Mac app to compare processed image before/after?
The first one that popped into my mind is Kaleidoscope. Not sure how it stacks up when compared to other image comparison apps...
Read more >
Image Comparison Analysis Tool (ICAT)
The Image Comparison & Analysis Tool (ICAT) is an application which allows ... another and use the slider to cover or reveal each...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found