资源简介

适合新手

资源截图

代码片段和文件信息

# -*- encoding=utf8 -*-
__author__ = “xingag“
import time

from airtest.core.api import *

auto_setup(__file__)

# 打包成apk运行

package_name = ‘com.ss.android.ugc.aweme‘
activity_name = ‘com.ss.android.ugc.aweme.splash.SplashActivity‘

# 部分手机需要开启模拟点击
start_app(package_nameactivity=activity_name)

sleep(6)


width = 1080
height = 2160

while True:
    sleep(3)
    # 滑动一次
    swipe( (width * 0.5 height*1/ 4)(width * 0.5 height*3 / 4)duration=0.5)

    # 下面这个方法打包成apk无效
    double_click((300600))



 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-03-16 05:51  TestPython-01\
     文件       10244  2020-06-02 09:00  TestPython-01\.DS_Store
     文件         120  2020-06-02 09:00  __MACOSX\TestPython-01\._.DS_Store
     目录           0  2020-03-20 10:03  TestPython-01\source\
     目录           0  2019-08-09 11:39  TestPython-01\.settings\
     文件         367  2019-08-09 10:40  TestPython-01\.project
     文件         459  2019-08-09 10:40  TestPython-01\.pydevproject
     目录           0  2020-04-16 02:47  TestPython-01\src\
     目录           0  2020-03-19 09:27  TestPython-01\source\pyecharts\
     文件         533  2020-03-19 09:27  __MACOSX\TestPython-01\source\._pyecharts
     文件        8196  2020-03-19 09:27  TestPython-01\source\.DS_Store
     文件         120  2020-03-19 09:27  __MACOSX\TestPython-01\source\._.DS_Store
     文件        1018  2020-03-16 11:48  TestPython-01\source\test2.txt
     文件         220  2020-03-16 11:48  __MACOSX\TestPython-01\source\._test2.txt
     文件       12412  2020-03-10 10:17  TestPython-01\source\test.xlsx
     文件         416  2020-03-10 10:17  __MACOSX\TestPython-01\source\._test.xlsx
     文件      193989  2020-03-20 07:28  TestPython-01\source\鍖椾含鍘嗗彶澶╂皵.csv
     文件        1667  2020-03-20 07:28  __MACOSX\TestPython-01\source\._鍖椾含鍘嗗彶澶╂皵.csv
     文件        1001  2020-03-16 05:37  TestPython-01\source\test.txt
     文件         417  2020-03-16 05:37  __MACOSX\TestPython-01\source\._test.txt
     文件       78560  2020-03-19 11:59  TestPython-01\source\zdw-test.zip
     文件         606  2020-03-19 11:59  __MACOSX\TestPython-01\source\._zdw-test.zip
     文件         220  2020-03-20 07:30  TestPython-01\.settings\org.eclipse.core.resources.prefs
     文件         679  2020-03-24 05:27  TestPython-01\src\瑙f瀽Json妗堜緥12.py
     文件         220  2020-03-24 05:27  __MACOSX\TestPython-01\src\._瑙f瀽Json妗堜緥12.py
     文件         567  2020-02-15 14:59  TestPython-01\src\apk_demo.py
     文件         368  2020-02-15 14:59  __MACOSX\TestPython-01\src\._apk_demo.py
     文件        2400  2020-03-19 09:20  TestPython-01\src\pyechart-demo.py
     文件         525  2020-03-19 09:20  __MACOSX\TestPython-01\src\._pyechart-demo.py
     文件        8196  2020-04-16 05:09  TestPython-01\src\.DS_Store
     文件         120  2020-04-16 05:09  __MACOSX\TestPython-01\src\._.DS_Store
............此处省略67个文件信息

评论

共有 条评论