Test suite modernization
This commit is contained in:
parent
0969f7c2f6
commit
52fdfd0347
141 changed files with 9947 additions and 4665 deletions
18
tests/demo/screens/navigation_screenshot.py
Normal file
18
tests/demo/screens/navigation_screenshot.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# navigation_screenshot.py - Take screenshot of navigation demo
|
||||
import mcrfpy
|
||||
from mcrfpy import automation
|
||||
import os
|
||||
|
||||
# Change to the correct directory for the demo
|
||||
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
# Run the navigation demo
|
||||
exec(open('navigation_demo.py').read())
|
||||
|
||||
# Take a screenshot after a brief delay
|
||||
def take_shot(rt):
|
||||
automation.screenshot('../screenshots/navigation_demo.png')
|
||||
print('Screenshot saved!')
|
||||
mcrfpy.exit()
|
||||
|
||||
timer = mcrfpy.Timer('screenshot', take_shot, 500)
|
||||
Loading…
Add table
Add a link
Reference in a new issue