*** Settings *** Library SeleniumLibrary Library SeleniumScreenshots *** Variables *** ${token} 4d4cce697b6828501eda1d14002fa0a081e0a938ad9328c4 *** Keywords *** Open url [Arguments] ${url} ${status} = Run keyword and return status Switch browser singleton Run keyword if ${status} == False ... Open browser ${url} alias=singleton ELSE Go to ${url} *** Keywords *** Run Selenium keyword and return status [Arguments] ${keyword} @{arguments} ${tmp}= Register keyword to run on failure No operation ${status}= Run keyword and return status ${keyword} @{arguments} Register keyword to run on failure ${tmp} [Return] ${status} Enter command [Arguments] ${cmd}=Close All Tabs Click element css:LI.p-TabBar-tab:nth-child(1) Click element css:LI.p-TabBar-tab:nth-child(3) Input text css:INPUT.p-CommandPalette-input ... ${cmd} Press keys css:INPUT.p-CommandPalette-input ... \n Click element css:LI.p-TabBar-tab:nth-child(1) *** Tasks *** Open JupyterLab Open url http://localhost:8888/lab Set window size 1200 900 ${requires token}= Run selenium keyword and return status ... Page should contain element id:password_input Run keyword if ${requires token} ... Input text id:password_input ${token} Run keyword if ${requires token} ... Click button id:login_submit Sleep 10s Enter command Close All Tabs *** Tasks *** Annotate main page Set window size 1200 900 ${n1}= Add note ... id:jp-top-panel ... text=1 ... position=bottom ${n2}= Add note ... id:filebrowser ... text=3 ${n3}= Add note ... css:DIV.jp-Launcher-section:nth-child(2) > DIV.jp-Launcher-cardContainer ... text=2 Capture page screenshot Remove elements ${n1} ${n2} ${n3} *** Tasks *** Create new Robot notebook Double click element ... css:[title="A quick start for Robot Framework with Jupyter"] Wait until page contains ... Robot notebook structure Sleep 2s *** Tasks *** Annotate Robot notebook Set window size 1200 900 ${n0}= Add note ... css:DIV[id='jp-main-dock-panel'] > DIV > UL ... text=1 ${n1}= Add note ... css:DIV.p-Widget.p-TabBar.jp-SideBar.jp-mod-left.p-BoxPanel-child > UL.p-TabBar-content > LI.p-TabBar-tab.p-mod-current ... text=6 ${n2}= Add note ... css:DIV.p-Widget.p-TabBar.jp-SideBar.jp-mod-left.p-BoxPanel-child > UL.p-TabBar-content > LI.p-TabBar-tab:nth-child(3) ... text=7 ${n3}= Add note ... css:DIV.p-Widget.jp-Toolbar.jp-NotebookPanel-toolbar > DIV.p-Widget.jp-ToolbarButton.jp-Toolbar-item:nth-child(1) > BUTTON.bp3-button.bp3-minimal.jp-ToolbarButtonComponent.minimal.jp-Button ... text=2 ${n4}= Add note ... id:Robot-notebook-structure ... text=3 ${n5}= Add note ... jquery:PRE.CodeMirror-line:contains('Test Cases') ... text=4 ${n6}= Add note ... link:Report ... text=5 ... position=right Capture page screenshot Remove elements ... ${n0} ${n1} ${n2} ${n3} ${n4} ${n5} ${n6} *** Tasks *** Open inspector and drag it to the right Enter command Show Contextual Help Set window size 1200 900 Drag and drop by offset ... css:LI.p-TabBar-tab.jp-mod-current.p-mod-closable.p-mod-current > DIV.p-TabBar-tabLabel ... 0 600 ${n1}= Add note ... id:jp-inspector ... text=1 Capture page screenshot Remove elements ${n1} *** Settings *** Suite teardown Close all browsers