-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpause_every_5minutes.py
60 lines (48 loc) · 1.73 KB
/
pause_every_5minutes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Import Tkinter for GUI
from tkinter import *
from tkinter import ttk
import tkinter.font as tkFont
# Import necessary tools for time pause and date
import time
import datetime
import threading
# Import the ADB_Action_Script.py
# This have all the core function to control the TV
from daaf.ADB_Action_Scipt import ActionScript
# Import the RC keys and App PKGs
# This is a supporting tools for ActionScript
# It has a list of RC key code and App PKGs
from daaf.RC_Code import SonyRCKey
from daaf.AppList import AppList
import daaf.Power_Tools as pt
from daaf.atvAuto import atvAuto
class TestScript(atvAuto):
def __init__(self, tkRoot):
""" Initialize the UI and then Set Title Header"""
# Update the string "Template" to your desired Title
super().__init__(tkRoot, "Netflix Pause - 5min")
# this is in minutes
self.playback_time = 1
# set loopCount default value
self.loopCount.set(50000)
def testCaseInfo(self):
"""
Set the test case info
This is the one that shows on the left side of the screen
Each call of the 'makeInstructionLabel' is one line
"""
self.makeInstructionLabel("Before Starting the Script:")
self.makeInstructionLabel("Launch any app")
self.makeInstructionLabel("Select and playback content")
self.makeInstructionLabel(" ----------------------------------")
self.makeInstructionLabel("What the script does:")
self.makeInstructionLabel("Press Pause every 5 minutes")
def runThis(self):
"""
Below is where you assemble test cases
"""
self.wait_minute(5)
self.press_rc_key("PAUSE")
# Start the script
root = Tk()
TestScript(root).startApp()