selenium grid
hub
java -jar selenium-server-standalone-3.141.59.jar -role hub
node
{
"capabilities":
[
{
"browserName": "chrome",
"platform": "WINDOWS",
"maxInstances": 1,
"seleniumProtocol": "WebDriver"
}
],
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 1,
"port": -1,
"register": true,
"registerCycle": 5000,
"hub": "http://localhost:4444",
"nodeStatusCheckTimeout": 5000,
"nodePolling": 5000,
"role": "node",
"unregisterIfStillDownAfter": 60000,
"downPollingLimit": 2,
"debug": false,
"servlets" : [],
"withoutServlets": [],
"custom": {}
}
appium
appium -p 4723 --nodeconfig .\appiumNode1.json
{
"capabilities":
[
{
"browserName": "model:HTC_One_XL",
"version":"6.0",
"maxInstances": 2,
"platform":"ANDROID"
}
],
"configuration":
{
"cleanUpCycle":2000,
"timeout":30000,
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"url":"127.0.0.1:4723/wd/hub",
"host": "127.0.0.1",
"port": 4723,
"maxSession": 2,
"register": true,
"registerCycle": 5000,
"hubPort": 4444,
"hubHost": "127.0.0.1",
"hubProtocol": "http"
}
}
appcrawler的指定配置yml文件中的各参数详细介绍在哪里能看到呢?如given、when、then如何使用,defineUrl、baseUrl是何种含义等。
如图所示,启动stf时报错,网上查找有人说是node版本问题,可是node版本我都换了三个了,还是不行,如果是node版本问题,那到底要那个版本哦?
老师红框部分,注册appium node时,config文件下的capabilities可以同时支持多个不同的配置吗?
比如一台PC上有两台手机要并行自动化,这个时候是在这台PC上分别注册2个独立的node呢,还是在一个node里面配置两个不同的capabilities?
问题:
雪球—行情—市场—港股–港股开户
打开了雪盈证券的页面,退不出去
问题一
环境:VM虚拟机、真机(开启调试)
版本:centOS 7
问题:STF向真机安装工具时报错

问题二
如果使用虚拟机启动STF,在配置IP地址的时候,填写本机自己的还是虚拟机的IP
./stf local --public-ip 地址 --allow-remote
问题1:
selectedList:
- xpath: "//*[@resource-id='com.xueqiu.android:id/title_container']//*[@clickable='true']"
- xpath: "//*[@resource-id='com.xueqiu.android:id/indices']//*[@clickable='true']"
- xpath: "//*[@resource-id='com.xueqiu.android:id/indicator']//*[@clickable='true']"
firstList:
- xpath: "//*[@resource-id='com.xueqiu.android:id/indices'][2]//*[@clickable='true']"
- xpath: "//*"
action: "driver.swipe(0.4, 0.4, 0.1, 0.4)"
但是!!,appcrawler并不支持在firstlist中实现action,这个提议我已经跟思寒说了,方案可行,但会在后面的开发中加入
问题2
由于你选用的属性是clickable=true,selectlist只会选择xpath有的内容,如果没有,就不选
given表示条件,用xpath表示,当given给定的xpath找到后会执行when,when通常是xpath和action的组合,最后的then是断言,断言xpath是否存在
given:
- xpath: xxx
- xpath: xxx
when:
- xpath: xxx
- action: xxx
then:
- xpath: xxx
- xpath: xxx
defineUrl:变更深度计算规则,默认是activity,但是activity可能会重,加上defineUrl就可以让activity+定制的内容
baseUrl:指定第一深度的xpath是哪个,默认是进入app的第一个页面
adb connect 报错
环境是本地手机远程连接到docker stf容器中的
C:\Users\>adb connect 10.0.75.2:7413
failed to authenticate to 10.0.75.2:7413
stf日志
2020-03-19T10:27:03.282Z INF/reaper 35 [reaper001] Device "10.0.75.2:7413" is present
2020-03-19T10:27:33.283Z INF/reaper 35 [reaper001] Reaping device "10.0.75.2:7413" due to heartbeat timeout
java -jar appcrawler-2.4.0-jar-with-dependencies.jar --capability “appPackage=com.xueqiu.android,appActivity=.view.WelcomeActivityAlias”
执行这个失败,结果见以下截图
appium日志的截图
好的,谢谢,不过我其实是想知道这个有没有一个官方文档介绍的