|
| 1 | +*** Settings *** |
| 2 | +Documentation Try the Examples |
| 3 | +Force Tags starter:example |
| 4 | +Library JupyterLibrary |
| 5 | +Resource ../../../resources/Browser.robot |
| 6 | +Resource ../../../resources/Lab.robot |
| 7 | +Resource ../../../resources/Selectors.robot |
| 8 | + |
| 9 | +*** Variables *** |
| 10 | +${KERNEL LANGUAGE} Robot Framework |
| 11 | + |
| 12 | +*** Test Cases *** |
| 13 | +Will the Example Starter Launch? |
| 14 | + [Documentation] Start the Example |
| 15 | + [Tags] example:opencv |
| 16 | + Open RobotLab |
| 17 | + ${prefix} = Set Variable example_ |
| 18 | + Execute JupyterLab Command Close All |
| 19 | + Wait Until Page Contains Element ${XP LAUNCH SECTION} |
| 20 | + Capture Page Screenshot ${prefix}_0_before_starter.png |
| 21 | + Click Element ${CSS LAUNCH CARD EXAMPLES} |
| 22 | + Wait Until Page Contains Element ${XP FILE TREE EXAMPLE OPENCV} timeout=10s |
| 23 | + Capture Page Screenshot ${prefix}_1_after_starter.png |
| 24 | + |
| 25 | +Will the OpenCV Notebook Run? |
| 26 | + [Documentation] Run the OpenCV Tutorial Notebook |
| 27 | + [Tags] example:opencv |
| 28 | + Open RobotLab |
| 29 | + ${prefix} = Set Variable example_opencv_ |
| 30 | + Open the Example Folder ${prefix} |
| 31 | + Open the Example Notebook ${prefix} ${XP FILE TREE EXAMPLE OPENCV} |
| 32 | + Run the Example Notebook ${prefix} |
| 33 | + Capture Page Screenshot ${prefix}_6_after_run_all.png |
| 34 | + The Robot Popup Should Contain ${prefix} Log passed, 0 failed |
| 35 | + The Robot Popup Should Contain ${prefix} Report All tests passed |
| 36 | + Capture Page Screenshot ${prefix}_7_reported.png |
| 37 | + Screenshot Each Output of Active JupyterLab Document ${prefix}_8_all_ |
| 38 | + |
| 39 | +*** Keywords *** |
| 40 | +Open the Example Folder |
| 41 | + [Arguments] ${prefix} |
| 42 | + [Documentation] Open the example folder |
| 43 | + Execute JupyterLab Command Close All |
| 44 | + Maybe Open JupyterLab Sidebar File Browser |
| 45 | + Click Element ${CRUMBS HOME} |
| 46 | + Double Click Element ${XP FILE TREE EXAMPLE} |
| 47 | + Capture Page Screenshot ${prefix}_1_in_folder.png |
| 48 | + |
| 49 | +Open the Example Notebook |
| 50 | + [Arguments] ${prefix} ${example} |
| 51 | + [Documentation] Open and prepare the example notebook |
| 52 | + Wait Until Page Contains Element ${example} timeout=10s |
| 53 | + Double Click Element ${example} |
| 54 | + Wait Until Page Contains ${KERNEL LANGUAGE} | Idle timeout=10s |
| 55 | + Capture Page Screenshot ${prefix}_2_after_launch.png |
| 56 | + Execute JupyterLab Command Clear All Outputs |
| 57 | + Sleep 1s |
| 58 | + Capture Page Screenshot ${prefix}_3_after_clean.png |
| 59 | + |
| 60 | +Run the Example Notebook |
| 61 | + [Arguments] ${prefix} |
| 62 | + [Documentation] Actually run the example notebook |
| 63 | + Execute JupyterLab Command Run All Cells |
| 64 | + Wait Until Page Does Not Contain [*] timeout=120s |
| 65 | + Wait Until Page Contains ${KERNEL LANGUAGE} | Idle timeout=120s |
| 66 | + Capture Page Screenshot ${prefix}_4_after_run.png |
0 commit comments