@@ -3,28 +3,35 @@ Library PuppeteerLibrary
33Suite Teardown Close Puppeteer
44Test Teardown Close All Browser
55
6+ *** Variables ***
7+ ${DEFAULT_BROWSER } chrome
8+
9+
610*** Test Cases ***
711Switch to new browser
8- ${HEADLESS } Get variable value ${HEADLESS } ${False }
12+ ${BROWSER } = Get variable value ${BROWSER } ${DEFAULT_BROWSER }
13+ ${HEADLESS } = Get variable value ${HEADLESS } ${False }
914 &{options } = create dictionary headless=${HEADLESS }
10- Open browser http://127.0.0.1:7272/basic-html-elements.html options=${options }
15+ Open browser http://127.0.0.1:7272/basic-html-elements.html browser= ${ BROWSER } options=${options }
1116 Run Async Keywords
12- ... Wait For New Window Open AND
13- ... Click Element id=open-new-tab
14- Switch Window NEW
17+ ... Click Element id=open-new-tab AND
18+ ... Wait For New Window Open
19+ Switch Window NEW
1520 Wait Until Page Contains Element id=exampleInputEmail1
1621 Switch Window title=Basic HTML Elements
1722 Wait Until Page Contains Element id=open-new-tab
1823
1924Handle multiple browser
25+ [Teardown] Capture Page Screenshot
26+ ${BROWSER } = Get variable value ${BROWSER } ${DEFAULT_BROWSER }
2027 ${HEADLESS } Get variable value ${HEADLESS } ${False }
2128 &{options } = create dictionary headless=${HEADLESS }
22- Open browser http://127.0.0.1:7272/basic-html-elements.html options=${options } alias=Browser 1
29+ Open browser http://127.0.0.1:7272/basic-html-elements.html browser= ${ BROWSER } options=${options } alias=Browser 1
2330 Run Async Keywords
2431 ... Wait For New Window Open AND
2532 ... Click Element id=open-new-tab
2633 Switch Window NEW
27- Open browser http://127.0.0.1:7272/basic-html-elements.html options=${options } alias=Browser 2
34+ Open browser http://127.0.0.1:7272/basic-html-elements.html browser= ${ BROWSER } options=${options } alias=Browser 2
2835 Switch Browser Browser 1
2936 Wait Until Page Contains Login form
3037 Switch Browser Browser 2
0 commit comments