AppiumTestDistribution / appium-wait-plugin

Plugin to automatically manage all element waits and enables to write wait-free appium tests.
MIT License
60 stars 11 forks source link

example showing working cliArgs #31

Closed boneskull closed 1 year ago

boneskull commented 2 years ago

To test this:

  1. Ensure npm v7 or newer
  2. Run npm ci in the working copy
  3. Run export APPIUM_HOME=/tmp/some-temp-dir. If that dir exists, delete it
  4. Run node_modules/.bin/appium driver install --source=local node_modules/@appium/fake-driver
  5. Run node_modules/.bin/appium plugin install --source=local .
  6. Run node_modules/.bin/appium driver list and node_modules/.bin/appium plugin list to ensure both fake and element-wait are installed
  7. Start the appium server: node_modules/.bin/appium server -ka 800 --use-plugins=element-wait --config ./server-config.json -pa /wd/hub --plugin-element-wait-interval-between-attempts=2000
  8. In a new terminal, run APPIUM_HOME=/tmp/some-temp-dir npm run test-e2e
  9. In the Appium server terminal, grep the log output for the cliArgs object

When you call super() without arguments, no arguments are passed into the parent constructor, therefore this.cliArgs won't get set. Your plugin, however, should receive cliArgs as the second parameter in its constructor.