测试人社区

【AppCrawler】times没生效,driver.swipe()只执行了1次

问题

testcase中times参数没生效,滑动操作只执行了一次。

怎么样才能执行1000次呢?

yaml文件

---
pluginList: []
saveScreen: true
reportTitle: ""
resultDir: ""
waitLoading: 500
waitLaunch: 6000
showCancel: true
maxTime: 10800
maxDepth: 10

capability:
  appPackage: com.xueqiu.android
  appActivity: .view.WelcomeActivityAlias
  noReset: "true"
  fullReset: "false"
  appium: "http://127.0.0.1:4723/wd/hub"

testcase:
  name: "TesterHome AppCrawler"
  steps:
  - xpath: //*
    action: driver.swipe(0.5,0.9,0.5,0.1)
    times: 1000

selectedList: []
firstList: []
lastList: []
backButton:
- given: []
  when: null
  then: []
  xpath: "Navigate up"
  action: null
  actions: []
  times: 0
triggerActions:
- given: []
  when: null
  then: []
  xpath: "share_comment_guide_btn"
  action: null
  actions: []
  times: 0
xpathAttributes:
- "name"
- "label"
- "value"
- "resource-id"
- "content-desc"
- "instance"
- "text"
sortByAttribute:
- "depth"
- "list"
- "selected"
findBy: "default"
defineUrl: []
baseUrl: []
appWhiteList: []
urlBlackList: []
urlWhiteList: []
blackList:
- given: []
  when: null
  then: []
  xpath: ".*[0-9]{2}.*"
  action: null
  actions: []
  times: 0
beforeRestart: []
beforeElement:
- given: []
  when: null
  then: []
  xpath: "/*"
  action: "Thread.sleep(500)"
  actions: []
  times: 0
afterElement: []
afterPage: []
afterPageMax: 2
tagLimitMax: 2
tagLimit:
- given: []
  when: null
  then: []
  xpath: "确定"
  action: null
  actions: []
  times: 1000
- given: []
  when: null
  then: []
  xpath: "取消"
  action: null
  actions: []
  times: 1000
- given: []
  when: null
  then: []
  xpath: "share_comment_guide_btn_name"
  action: null
  actions: []
  times: 1000
assertGlobal: []

@seveniruby 思寒老师有空帮忙看看?

times是用于trigger的,不是用于自动化用例的。所以写到这个地方没用。

好的~谢谢思寒老师~