Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image recognition not working #7

Open
Abur73 opened this issue Sep 12, 2018 · 1 comment
Open

Image recognition not working #7

Abur73 opened this issue Sep 12, 2018 · 1 comment

Comments

@Abur73
Copy link

Abur73 commented Sep 12, 2018

While testing image recognition, I was not able to make it work.

Appium Desktop 1.7.0

[2018-09-12 10:54:41][BaseDriver] Verifying screenshot size and aspect ratio
[2018-09-12 10:54:41][BaseDriver] Screenshot size matched screen size
[2018-09-12 10:54:41][W3C] Encountered internal error running command: Error: opencv4nodejs module is required to use OpenCV features. Please install it first (npm i -g opencv4nodejs) and restart Appium. Read https://github.com/justadudewhohacks/opencv4nodejs#how-to-install for more details on this topic.
[2018-09-12 10:54:41][W3C] at initOpenCV (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-support/lib/image-util.js:100:11)
[2018-09-12 10:54:41][W3C] at Object.getImageOccurrence$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-support/lib/image-util.js:420:3)
[2018-09-12 10:54:41][W3C] at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)

Nevertheless, opencv4nodejs is already installed

$ npm list -g --depth=0
/usr/local/lib
├── npm@5.6.0
└── opencv4nodejs@4.7.5

@Abur73
Copy link
Author

Abur73 commented Sep 12, 2018

Got it working for standalone Appium 1.9.0 though.

$ npm list -g --depth=0
/usr/local/lib
├── appium@1.9.0
├── npm@5.6.0
└── opencv4nodejs@4.7.5

2018-09-12 11:29:27:078 - [BaseDriver] Finding image element with match threshold 0.4
2018-09-12 11:29:27:078 - [debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"getDeviceSize","params":{}}
2018-09-12 11:29:27:080 - [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"getDeviceSize","params":{}}
2018-09-12 11:29:27:081 - [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
2018-09-12 11:29:27:081 - [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getDeviceSize
2018-09-12 11:29:27:082 - [debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":{"height":800,"width":480}}
2018-09-12 11:29:27:082 - [debug] [AndroidBootstrap] Received command result from bootstrap
2018-09-12 11:29:27:082 - [debug] [BaseDriver] Waiting up to 0 ms for condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant