Skip to content

Instantly share code, notes, and snippets.

View atthaboon's full-sized avatar

Atthaboon Sanurt (P'Art) atthaboon

View GitHub Profile
${text} = Set Variable If $text is None ${EMPTY} ${text}
${text} = Set Variable If "${text}" == "${None}" ${EMPTY} ${text}
Should Be Equal ${text} ${None}
${text} = Set Variable If ${text} == ${None} ${EMPTY} ${text}
Should Be Equal ${text} ${None}
Element should containt text
Element Should Contain id=prop-text Please ${True}
Element should not contain text
Element Should Not Contain id=prop-text Please input2 ${True}
Element text should be
Element Text Should Be id=prop-text Please input ${True}
Element text should not be
Element is visible and not visible
Element Should Be Visible id:prop-visible
Element Should Not Be Visible id:prop-hide
Run Keyword And Expect Error REGEXP:Element 'id:prop-hide' is not be visible Element Should Be Visible id:prop-hide
Element proprty is enable
Element Should Be Enabled id:prop-enable
Element property is disable
Element Should Be Disabled id:prop-disable
Run Keyword And Expect Error REGEXP:Element 'id:prop-enable' is enabled Element Should Be Disabled id:prop-enable
@atthaboon
atthaboon / demo-debug-mode.robot
Created September 16, 2020 09:51
Enable debug mode
*** Settings ***
Library PuppeteerLibrary
Test Teardown Close All Browser
Suite Teardown Close Puppeteer
*** Test Cases ***
Enable debug mode
Enable Debug Mode
Open browser to test page http://127.0.0.1:7272/login-form-example.html
*** Settings ***
Library PuppeteerLibrary
Test Teardown Close All Browser
Suite Teardown Close Puppeteer
*** Test Cases ***
Accept alert
&{options} = create dictionary headless=${False}
Open browser http://127.0.0.1:7272/basic-html-elements.html options=${options}
Run Async Keywords
@atthaboon
atthaboon / demo-browser-management.robot
Created September 15, 2020 00:02
Demo handle browser
*** Settings ***
Library PuppeteerLibrary
Suite Teardown Close Puppeteer
*** Test Cases ***
Switch to new browser
&{options} = create dictionary headless=${False}
Open browser http://127.0.0.1:7272/basic-html-elements.html options=${options}
Run Async Keywords
... Wait For New Window Open AND
*** Settings ***
Library PuppeteerLibrary
*** Test Cases ***
Submit login form
&{options} = create dictionary headless=${False}
Open browser http://127.0.0.1:7272/login-form-example.html options=${options}
Input Text id=exampleInputEmail1 demo@qahive.com
Input Text id=exampleInputPassword1 123456789
Click Element id=exampleCheck1