Skip to content

Instantly share code, notes, and snippets.

View atthaboon's full-sized avatar

Atthaboon Sanurt (P'Art) atthaboon

View GitHub Profile
#!/bin/sh
cd `dirname $0`/..
OUTDIR=reports
OUTFILE=$OUTDIR/rails_best_practices.properties
TMPFILE=`mktemp $OUTDIR/rails_best_practices.XXXXXX`
mkdir $OUTDIR 2> /dev/null
rails_best_practices > $TMPFILE
@atthaboon
atthaboon / robot
Created July 12, 2020 11:07
Demo selenium flaky test
*** Settings ***
Library SeleniumLibrary
*** Test Cases ***
Demo selenium flaky test
Open Browser http://127.0.0.1:7272/ajax-demo.html browser=chrome
Maximize Browser Window
Input Text id=idcard 123456789
Click Element id=verify
Wait Until Element Is Not Visible id=loading
@atthaboon
atthaboon / puppeteer-ajax.robot
Created July 12, 2020 11:21
robotframework-puppeteer fix flaky test
*** Settings ***
Library PuppeteerLibrary
*** Test Cases ***
Demo puppeteer solve flaky test
Open Browser http://127.0.0.1:7272/ajax-demo.html browser=chrome
Maximize Browser Window
Input Text id=idcard 123456789
Run Async Keywords
... Click Element id=verify AND
@atthaboon
atthaboon / puppeteer-percy-demo.robot
Created July 27, 2020 03:32
Demo script for puppeteer-percy-demo
*** Settings ***
Library PuppeteerLibrary
Library PuppeteerPercy
Test Teardown Close Browser
*** Test Cases ***
Capture Example page
${HEADLESS} Get variable value ${HEADLESS} ${False}
&{options} = create dictionary headless=${HEADLESS}
@atthaboon
atthaboon / gist:87f413dadc183d15161a24599f60e47f
Created August 14, 2020 11:36
selenium-browser-control
*** Settings ***
Library SeleniumLibrary
*** Test Cases ***
Demo script 01
[Teardown] Close All Browsers
Open Browser https://qahive.github.io/robotframework-puppeteer.github.io/ browser=chrome
Click Element css=a[href="https://qahive.github.io/robotframework-puppeteer/PuppeteerLibrary.html"]
Switch Window NEW
@atthaboon
atthaboon / gist:edb0d1d021d6571aac7d4f7d57a65b28
Created August 14, 2020 11:38
puppeteer-browser-control.robot
*** Settings ***
Library PuppeteerLibrary
Suite Teardown Close Puppeteer
*** Variables ***
&{options} headless=${False}
*** Test Cases ***
Demo script 01
[Teardown] Close All Browser
@atthaboon
atthaboon / robot
Created September 9, 2020 00:05
Puppeteer: Solve animation flaky test
*** Settings ***
Library PuppeteerLibrary
*** Test Cases ***
Demo solve animation flaky test
&{options} = create dictionary headless=${False}
Open Browser https://getbootstrap.com/docs/4.0/components/modal/ options=${options}
Run Async Keywords
... Click Element css=button[data-target="#exampleModalLive"] AND
... Wait Until Element Is Visible id=exampleModalLive
@atthaboon
atthaboon / robot
Created September 9, 2020 00:12
Issue animation flaky test
*** Settings ***
Library PuppeteerLibrary
*** Test Cases ***
Demo issue animation flaky test
&{options} = create dictionary headless=${False}
Open Browser https://getbootstrap.com/docs/4.0/components/modal/ options=${options}
Run Async Keywords
... Click Element css=button[data-target="#exampleModalLive"] AND
... Wait Until Element Is Visible id=exampleModalLive
*** 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
@atthaboon
atthaboon / demo-form-register.robot
Created September 13, 2020 08:36
Demo from register
*** Settings ***
Library PuppeteerLibrary
*** Test Cases ***
Submit register form
&{options} = create dictionary headless=${False}
Open browser http://127.0.0.1:7272/register-form-example.html options=${options}
Input Text id=inputEmail4 demo@qahive.com
Input Text id=inputPassword4 123456789
Input Text id=inputAddress 123/234 wallstreet std.