def wakeup_input_passward(self):
     self.run_log("唤醒手机/Wake up mobile Phone...")
     Phone.wakeup()
     time.sleep(1)
     self.run_log("解锁屏幕/Unlock screen....")
     Phone.swipe(198, 1375, 948, 712)
     time.sleep(1)
 def wakeup_input_passward(self):
     self.run_log("Wake up mobile Phone...")
     Phone.wakeup()
     time.sleep(1)
     self.run_log("Unclock screen....")
     Phone.swipe(130, 870, 563, 622)
     time.sleep(1)
Exemple #3
0
    def test_idlescreen_lock_screen(self):
        print("Test Lock screen")
        if d.screen == "off":
            d.wakeup()
            time.sleep(4)

        for i in range(0, 5):
            d.press.power()
            time.sleep(2)
            d.wakeup()
            time.sleep(3)
Exemple #4
0
    def  test_idlescreen_lock_screen(self):
        print("Test Lock screen")
        if d.screen == "off":
            d.wakeup()
            time.sleep(4)

        for i in range(0, 5):
           d.press.power()
           time.sleep(2)
           d.wakeup()
           time.sleep(3)
Exemple #5
0
 def wakeup_input_passward(self):
     self.run_log("唤醒手机/Wake up mobile Phone...")
     Phone.wakeup()
     time.sleep(1)
     self.run_log("解锁屏幕/Unlock screen....")
     Phone.swipe(198, 1375, 948, 712)
     time.sleep(1)
     self.run_log("输入密码/Input password...")
     Phone.click(219, 924)  # 1
     time.sleep(1)
     Phone.click(539, 1340)  # 8
     time.sleep(1)
     Phone.click(855, 934)  # 3
     time.sleep(1)
     Phone.click(857, 1329)  # 9
Exemple #6
0
def startGame():
    d.wakeup()
    d.click(256, 1123)
    sleep(1)
    d.click(451, 408)
    sleep(0.5)
    d.click(277, 543)
    for i in range(waitTime):
        sleep(10)
        d.click(277, 543)
        print "sleep " + str((i + 1) * 10) + " seconds"
    # 点掉所有的框
    d.click(1069, 80)
    sleep(1)
    # 进入游戏
    d.click(420, 325)
    sleep(10)
    # 点掉所有的框
    d.click(1069, 80)
    sleep(0.5)
 def setUp(self):
     super(Browser, self).setUp()
     #d.start_activity(action='android.intent.action.DIAL', data='tel:13581739891', flags=0x04000000)
     d.wakeup()
 def checkScreen(self):
     d.sleep()
     if d.screen == "off":  # of d.screen != "on"
         d.wakeup()
         time.sleep(2)
Exemple #9
0
 def setUp(self):
     super(Browser, self).setUp()
     #d.start_activity(action='android.intent.action.DIAL', data='tel:13581739891', flags=0x04000000)
     d.wakeup()
Exemple #10
0
 def setUp(self):
     super(Phone, self).setUp()
     d.wakeup()
Exemple #11
0
 def unlockScreen(self):
     d.wakeup()
     if d(resourceId='com.android.systemui:id/clock_view').wait.exists(
             timeout=2000):
         d.swipe(D_C_X, D_HEIGHT - 1, D_C_X, 0, 5)
Exemple #12
0
#!/usr/bin/python
from uiautomator import device as d

import time

# 开关屏幕50次
for i in range(1,50):
    d.sleep()
    time.sleep(0.2)
    d.wakeup()
    time.sleep(0.2)
    # 新增wrapper,检查屏幕是否开启
    # 若没有开启则不正常
    if not d.screen.ison()
        print("第" + i + "次没有正常开启屏幕")
Exemple #13
0
def wakeUp():
    d.wakeup()
Exemple #14
0
 def setUp(self):
     super(Phone, self).setUp()
     d.wakeup()
def light():
    d.wakeup()
    d.screen.on()
Exemple #16
0
 def setUp(self):
     super(MessageTest, self).setUp()
     self.runComponent = PACKAGE_NAME + '/' + ACTIVITY_NAME
     d.wakeup()
     d.press('home')
Exemple #17
0
 def test_opencamera(self):
     if (d.screen == "off"):
         d.wakeup()
     d(text="Camera").click()
     d.press("back")
Exemple #18
0
 def setUp(self):
     super(IreaderTest, self).setUp()
     d.wakeup()
     d.watcher("AUTO_FC_WHEN_ANR").when(text="ANR").when(text="Wait") \
                          .press.back.home()
     d.press('home')