Hi Aleksei,
I have already installed the opencv through npm,
When I run any driver.findByImage(“path.png”)
I get this error from appium server:
mime must be a string
[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.
[W3C] at initOpenCV (C:\node_modules\appium\node_modules\appium-support\lib\image-util.js:100:11)
[W3C] at Object.getImageOccurrence$ (C:\node_modules\appium\node_modules\appium-support\lib\image-util.js:420:3)
[W3C] at tryCatch (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
[W3C] at GeneratorFunctionPrototype.invoke [as _invoke] (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
[W3C] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
[W3C] at invoke (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
[W3C] at enqueueResult (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:185:17)
[W3C] at new Promise ()
[W3C] at new F (C:\node_modules\appium\node_modules\core-js\library\modules$.export.js:30:36)
[W3C] at AsyncIterator.enqueue (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:184:12)
[W3C] at AsyncIterator.prototype.(anonymous function) [as next] (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
[W3C] at Object.runtime.async (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:209:12)
[W3C] at Object.getImageOccurrence (C:\node_modules\appium\node_modules\appium-support\build\lib\image-util.js:632:30)
[W3C] at AndroidDriver.callee$0$0$ (C:\node_modules\appium\node_modules\appium-base-driver\lib\basedriver\commands\images.js:47:32)
[W3C] at tryCatch (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
[W3C] at GeneratorFunctionPrototype.invoke [as _invoke] (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
[W3C] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
[W3C] at invoke (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
[W3C] at enqueueResult (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:185:17)
[W3C] at new Promise ()
[W3C] at new F (C:\node_modules\appium\node_modules\core-js\library\modules$.export.js:30:36)
[W3C] at AsyncIterator.enqueue (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:184:12)
[W3C] at AsyncIterator.prototype.(anonymous function) [as next] (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
[W3C] at Object.runtime.async (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:209:12)
[W3C] at AndroidDriver.callee$0$0 [as compareImages] (C:\node_modules\appium\node_modules\appium-base-driver\build\lib\basedriver\commands\images.js:55:30)
[W3C] at AndroidDriver.condition$ (C:\node_modules\appium\node_modules\appium-base-driver\lib\basedriver\commands\find.js:111:26)
[W3C] at tryCatch (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
[W3C] at GeneratorFunctionPrototype.invoke [as _invoke] (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
[W3C] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
[W3C] at GeneratorFunctionPrototype.invoke (C:\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
I am mantion that I already use install opencv in various ways:
npm install --save opencv4nodejs
npm i -g opencv4nodejs
And also tried mannually, the appium doctor keep saying:
WARN AppiumDoctor opencv4nodejs cannot be found
But I got indication that the opencv is installed success when install from npm,
maybe Windows 10 path is wrong ? I add mannually all the pathes that I could,
I don’t know what else to do in order that the npm/Windows recognize the opencv and activate him.
Any help will be appriciate!