Comments (23)
If you go into the place where appium is installed, and run node
, you'll get an interactive node.js prompt. From there, run require("test-ai-classifier");
If you get an error, it means the classifier module is not correctly installed and accessible to appium.
If not, it means everything is good, just make sure you restarted the appium server after installing it.
from appiumpro.
Looks like the classifier didn't install correctly with npm install
. Worked with npm install -g @latest
. Thanks!
from appiumpro.
I am also facing the similar issue in Mac System with Android Device , with Walmart App
Error is :
Encountered internal error running command: Error: Could not load your custom find module 'ai'. Did you put it somewhere Appium can 'require' it? Original error: Error: Cannot find module 'test-ai-classifier'
Version details : Node : v10.16.0 npm : 6.9.0 . Appium Desktop Mac Version : 1.10.0
Source Code :
HashMap<String, String> customFindModules = new HashMap<>();
customFindModules.put("ai", "test-ai-classifier");
dc.setCapability("appPackage","com.walmart.android");
dc.setCapability("appActivity", "com.walmart.android.app.main.MainActivity");
dc.setCapability(MobileCapabilityType.PLATFORM_VERSION, "8.0.1");
dc.setCapability(MobileCapabilityType.APPIUM_VERSION, "1.10.0");
dc.setCapability("customFindModules", customFindModules);
dc.setCapability("shouldUseCompactResponses", false);
Identifiers Used :
driver.findElement(MobileBy.custom("cart")).click();
driver.findElement(MobileBy.custom("search")).click();
Tried both the suggestions @jlipps and @aaleksandroff , But no luck.
Note : No errors found while invoking require("test-ai-classifier"); under node console.
Please help me out , If some one has find similar issues.
Thanks in Advance.
from appiumpro.
I am having the exact same error as @BSudheerR , none of the above solutions seem to work.
from appiumpro.
I am also getting the exact same error while running android driver. But if i see the node -> require("test-ai-classifier") , i am getting the below response.
2019-06-19 17:48:58.486807: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2 FMA
{ find: [Getter] }
None of the above solutions working.
from appiumpro.
how did you install test-ai-classifier, and how are you running appium?
from appiumpro.
from appiumpro.
This will not work with Appium Desktop, only CLI appium. How are you starting Appium? Where is Appium installed on disk?
from appiumpro.
from appiumpro.
ok, head into /usr/local/lib/node_modules/appium
then run npm install test-ai-classifier
, to make sure it's getting into appium's dependency tree. then restart the appium server and see if it helps.
from appiumpro.
from appiumpro.
Oh, this won't work on the Android driver, only the UiAutomator2 driver. Will add that to the README if it's not already there.
from appiumpro.
Noted in testdotai/appium-classifier-plugin@b26b56b
from appiumpro.
from appiumpro.
from appiumpro.
findByCustom is probably on AppiumDriver, so in Java you'd need to use either IOSDriver or AndroidDriver to access it. or cast to AppiumDriver somehow.
from appiumpro.
Hi jlipps,
Thanks in advance for the help.
I had followed all the necessary steps of installation.
Installed test-ai-classifier in appium root dir
tried with require(test-ai-classifer) in node and seems to be ok.
For the android , even though I was using the uiAutomator2 , I am
getting the error.
I am getting could not load custom find module ai.
Tried with AppiumDriver and AndroidDriver both.
I am trying out in windows pc.
Please help me set up for andriod.
Code doesn't give error and able to use findBy custom.
But when trying to execute i am facing the issue.
Thanks
Revanth.
from appiumpro.
Dear Jlipps,
I am getting following error.
Pls suggest.
- Finding an Android element with machine learning magic
should find the cart button:
Error: [elementByCustom("ai:cart")] Error response status: 13, , UnknownError - An unknown server-side error occurred while processing the command. Selenium error: An unknown server-side error occurred while processing the command. Original error: Could not load your custom find module 'ai'. Did you put it somewhere Appium can 'require' it? Original error: Error: Cannot find module 'test-ai-classifier'
Thanks
Anbu
from appiumpro.
from appiumpro.
from appiumpro.
from appiumpro.
Dear Dr Anbunathan R,
I am facing the same issue you faced, could you please tell how you properly installed test-ai-classifier.
Actually I installed globally using npm install -g test-ai-classifier and after doing nope and require('test-ai-classifier '). I always get the same error even after restarting the computer. By the way my case is android related. Thanks in advance.
Below the error:
Welcome to Node.js v12.14.0.
Type ".help" for more information.
require("test-ai-classifier");
Thrown:
Error: Cannot find module 'test-ai-classifier'
Require stack:
- at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15) at Function.Module._load (internal/modules/cjs/loader.js:690:27) at Module.require (internal/modules/cjs/loader.js:852:19) at require (internal/modules/cjs/helpers.js:74:18) { code: 'MODULE_NOT_FOUND', requireStack: [ '' ]
}
PS: Capabilities: UiAutomator2 set and used Appium version is 1.19.1
from appiumpro.
Dear Eric Nana,
I have explained the steps to solve this issue under the following link:
https://stackoverflow.com/questions/65280383/how-to-properly-install-test-ai-classifier-plugin-for-appium-in-order-to-be-able/65280741#65280741
Regards,
Dr Anbunathan R
from appiumpro.
Related Issues (20)
- Python HOT 1
- Python HOT 1
- Hello,dose editions-39(AI) support Python? HOT 3
- Error: Could not load your custom find module 'ai'. HOT 1
- Encountered internal error running command: TypeError: Cannot destructure property x of 'undefined' or 'null'. HOT 2
- tf.fromPixels() is renamed to tf.browser.fromPixels(), You can disable deprecation warnings with tf.disableDeprecationWarnings(). HOT 1
- Error: Prediction result array had 4 elements but labels list had 106 elements. HOT 2
- Device Communication
- Events API - Java Client Version
- FAILED: testMemoryUsage
- Edition052_Automate_Mac: org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters.
- node: symbol lookup error: /usr/local/lib/node_modules/test-ai-classifier/build/Release/test-ai-classifier.node: undefined symbol: TF_Version
- If the image is itself is not visible on the screen
- java.io.IOException: Stream closed FFmpeg capturer for duration HOT 1
- zoom in and zoom out not working on dialect OSS HOT 1
- Setting location in yml file
- scroll not working HOT 7
- Image recognition not working HOT 1
- Looks like a typo here - looking forward to trying this out soon! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appiumpro.