Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tutorials/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,15 @@ def show_other_widgets():
switch_window(presses=3)


def bring_main_window_to_front():
# activate the MSUI main window.
if sys.platform == 'darwin':
pag.hotkey(WIN, 'up')
else:
pag.hotkey(CTRL, 'up')
pag.sleep(1)


def msui_full_screen_and_open_first_view(view_cmd='h'):
"""
Open the first view and go full screen in MSUI.
Expand All @@ -763,6 +772,8 @@ def msui_full_screen_and_open_first_view(view_cmd='h'):
"""
pag.sleep(1)
if view_cmd is not None:
# The view shortcut is window-scoped
bring_main_window_to_front()
pag.hotkey(CTRL, view_cmd)
pag.sleep(1)
create_tutorial_images()
Expand Down
Loading