Giter Club home page Giter Club logo

Comments (23)

jlipps avatar jlipps commented on July 23, 2024

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.

aaleksandroff avatar aaleksandroff commented on July 23, 2024

Looks like the classifier didn't install correctly with npm install. Worked with npm install -g @latest. Thanks!

from appiumpro.

BSudheerR avatar BSudheerR commented on July 23, 2024

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.

d1a2n3i avatar d1a2n3i commented on July 23, 2024

I am having the exact same error as @BSudheerR , none of the above solutions seem to work.

from appiumpro.

mohank2k avatar mohank2k commented on July 23, 2024

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.

jlipps avatar jlipps commented on July 23, 2024

how did you install test-ai-classifier, and how are you running appium?

from appiumpro.

mohank2k avatar mohank2k commented on July 23, 2024

from appiumpro.

jlipps avatar jlipps commented on July 23, 2024

This will not work with Appium Desktop, only CLI appium. How are you starting Appium? Where is Appium installed on disk?

from appiumpro.

mohank2k avatar mohank2k commented on July 23, 2024

from appiumpro.

jlipps avatar jlipps commented on July 23, 2024

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.

mohank2k avatar mohank2k commented on July 23, 2024

from appiumpro.

jlipps avatar jlipps commented on July 23, 2024

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.

jlipps avatar jlipps commented on July 23, 2024

Noted in testdotai/appium-classifier-plugin@b26b56b

from appiumpro.

mohank2k avatar mohank2k commented on July 23, 2024

from appiumpro.

mohank2k avatar mohank2k commented on July 23, 2024

from appiumpro.

jlipps avatar jlipps commented on July 23, 2024

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.

RevanthKumarG avatar RevanthKumarG commented on July 23, 2024

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.

anbunathan avatar anbunathan commented on July 23, 2024

Dear Jlipps,
I am getting following error.
Pls suggest.

  1. 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.

BSudheerR avatar BSudheerR commented on July 23, 2024

from appiumpro.

anbunathan avatar anbunathan commented on July 23, 2024

from appiumpro.

BSudheerR avatar BSudheerR commented on July 23, 2024

from appiumpro.

ericnana avatar ericnana commented on July 23, 2024

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.

anbunathan avatar anbunathan commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.