线下班第二期演练课_20180225

大家的问题可以回复此贴

今天的知识点

bash_profile

vi ~/.bash_profile

http_proxy

npm

第一种通过代理

proxy=http://112.126.81.122:6$(date +%m%d)
http_proxy=$proxy https_proxy=$proxy npm --proxy $proxy --https-proxy $proxy  install -g appium --verbose

第二种通过淘宝的cnpm工具,但是最后需要自己手工link,切记一定不要在用cnpn的时候设置代理或者***。

npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install -g appium

cnpm是一个简写

alias cnpm="npm --registry=https://registry.npm.taobao.org \\
--cache=$HOME/.npm/.cache/cnpm \\
--disturl=https://npm.taobao.org/dist \\
--userconfig=$HOME/.cnpmrc"

selendroid uiautomator chromedriver 是最难下载的部分

参考连接: https://testerhome.com/topics/6040

WebDriver协议介绍


curl  http://127.0.0.1:4723/wd/hub/sessions
session_id=7db75c0c-588a-4155-a037-1d23d09a61c1
curl -X POST http://127.0.0.1:4723/wd/hub/session/$session_id/elements --data-binary '{"using":"id","value":"com.xueqiu.android:id/rl_login_by_wx"}' -H "Content-Type: application/json; charset=UTF-8" -vv
curl -X POST  http://127.0.0.1:4723/wd/hub/session/$session_id/element/7/click   -H "Content-Type: application/json; charset=UTF-8" -vv

click(){ curl -X POST  http://127.0.0.1:4723/wd/hub/session/$session_id/element/$1/click   -H "Content-Type: application/json; charset=UTF-8" -vv; }
click 7 

webdriver协议介绍:https://www.w3.org/TR/webdriver/#list-of-endpoints

关闭