Пример #1
0
    def openBox(self):
        """开宝箱并看广告.
        """
        act.wait(3)
        #点击宝箱
        act.tapWithRand(920, 720)

        #等宝箱打开页面加载
        act.wait(4)

        #点击广告
        act.tapWithRand(550, 720)

        #等广告页面看完
        act.wait(60)

        #退出下载页面
        #oUtils.backKey()
        #act.wait(3)

        #退出广告页面
        oUtils.backKey()
        act.wait(3)

        return
Пример #2
0
    def test_tapWithRand(self):
        print("点击:(500,300)")
        act.tapWithRand(500, 300)
        act.wait(2)

        print("点击:(500,600)")
        act.tapWithRand(500, 600, 600)
        act.wait(2)
Пример #3
0
    def open20AdVideo(self):
        """限时任务. 半屏模式,需要装限时任务栏滑动到导航栏下.
        """

        act.wait(3)
        #半屏坐标
        act.tapWithRand(700, 380, 16)
        #等广告看完
        act.wait(60)
        #oUtils.backKey()
        #act.wait(3)
        oUtils.backKey()
        act.wait(3)
        return
Пример #4
0
    def eatRadBagAndOpenBox(self):
        act.tapWithRand(110, 480)
        #等任务页面加载(任务中心加载时长较大)
        act.wait(10)

        #点击宝箱
        act.tapWithRand(920, 720)

        #等宝箱打开页面加载
        act.wait(4)

        #点击广告
        act.tapWithRand(550, 720)

        #等广告页面看完
        act.wait(40)

        #退出下载页面
        oUtils.backKey()
        act.wait(3)

        #退出广告页面
        oUtils.backKey()
        act.wait(3)

        #退出任务中心页面
        oUtils.backKey()
        act.wait(3)

        #完成.
        return