Appium Setup - no ./reset.sh file

2019-07-15 13:33发布

I am attempting to set up Appium and am following the tutorial.

I get to the cd appium; ./reset.sh line in Install Ruby section. I don't have a reset.sh file anywhere. I've installed all prior steps, as well as XCode and Android Dev Studio.

So I tried to skip over that step, and simply run appium with node ., which throws error:

Error: Cannot find module '/Users/myname/Sites/myproject/appium

Obviously it needs a server.js or app.js file, but the git clone git://github.com/appium/appium.git repo clone did not come with one.

I'm a web dev by training, but my task is to do QA. I'm not sure which other steps I should take to get Appium started. I simply want to get it running so I can start writing test functional test cases.

1条回答
孤傲高冷的网名
2楼-- · 2019-07-15 14:32

Follow these steps:

  1. Install homebrew:

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Uninstall home-brew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

  1. Install node and npm:

    brew install node

  2. Install appium:

    npm install -g appium

To start the appium server, run: appium

HOW TO FIX ERROR: ENOENT LSTAT NPM WHEN TRYING TO INSTALL MODULES

npm cache clean

error: uncaughtException: fn must be a function

To fix this upgrade node or uninstall node and install node and appium again brew uninstall node brew upgrade node and then install npm again

  1. ios-webkit-debug-proxy installation and use, refer: https://github.com/penguinho/appium/blob/master/docs/en/advanced-concepts/ios-webkit-debug-proxy.md https://github.com/google/ios-webkit-debug-proxy https://github.com/jchuong/ios-webkit-debug-proxy

Install ios-webkit-debug-proxy only in iOS to enable appium to switch to web view context. brew install ios-webkit-debug-proxy

NOTE: the proxy requires the "web inspector" to be turned on to allow a connection to be established. Turn it on by going to settings > safari > advanced > web inspector - On. Please be aware that the web inspector was added as part of iOS 6 and was not available previously.

  1. brew install --HEAD ideviceinstaller
查看更多
登录 后发表回答