testdotai / appium-classifier-plugin

Apache License 2.0
259 stars 78 forks source link

Dependency issues and "blank screens" Appium #19

Open iantimmis opened 5 years ago

iantimmis commented 5 years ago

Operating System: MacOS

Issue: I cd'd into my "applications/appium/contents/.../app" directory and npm installed test-ai-classifier. After trying to start up appium, it resulted in an error "cannot find module prop-types". I then had to install prop-types. Appium crashed again warning that it could not find module uuid. This happened again for the lodash, bluebird, xpath, appium-support, request-promise, moment packages. After Appium finally didn't crash on startup because of missing modules, it started up and the screen was blank. I wait a while and nothing ever appears.

Screen Shot 2019-05-23 at 4 16 46 PM
jlipps commented 5 years ago

Hmm, I am not sure if this plugin will work in the context of an electron app. Can you install the plugin globally instead? And delete Appium Desktop and try again?

iantimmis commented 5 years ago

I reinstalled Appium, and installed test-ai-classifier globally with npm. I started an Appium session with the following capability set: { "app": "/.apk", "platformName": "android", "deviceName": ":5555", "customFindModules": { "ai": "test-ai-classifier" } }

This will launch the android app on the emulator and start up Appium. But when I click the "search for element" button, there is no sign of --custom or anything relating to test-ai-classifier in the locator strategy.

Versions:

jlipps commented 5 years ago

Unfortunately this is expected. There's no specific support for the -custom locator strategy within Appium Desktop. You'll need to write and execute script files in order to access it.

itimmisriis commented 5 years ago

Thanks for the help. Do you have any examples / resources for how to do this? (for android specifically)

jlipps commented 5 years ago

I wrote a blog post about how to set it up. The post uses iOS but it works the same for android. https://appiumpro.com/editions/39