This commit is contained in:
parent
56b413fcca
commit
b5d10ed938
16
.drone.yml
16
.drone.yml
|
@ -51,6 +51,22 @@ steps:
|
|||
depends_on:
|
||||
- reveal-env
|
||||
|
||||
- name: test02
|
||||
pull: if-not-exists
|
||||
image: immawanderer/archlinux-rf:latest
|
||||
volumes:
|
||||
- name: shm
|
||||
path: /dev/shm
|
||||
commands:
|
||||
- mkdir -pv results/${DRONE_STAGE_NAME}/test02
|
||||
- robot -T -d results/${DRONE_STAGE_NAME}/test02 test02.robot
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
depends_on:
|
||||
- reveal-env
|
||||
|
||||
- name: test03
|
||||
pull: if-not-exists
|
||||
image: immawanderer/archlinux-rf:latest
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
*** Settings ***
|
||||
Library SeleniumLibrary run_on_failure=Nothing
|
||||
|
||||
*** Variables ***
|
||||
${URL} https://git.dotya.ml/
|
||||
${BROWSER} chrome
|
||||
${DELAY} 0.2
|
||||
|
||||
${LOGIN_BUTTON} //*[@id="navbar"]/div[2]/a[2]
|
||||
${SIGN_IN} //form/div[4]/button[1]
|
||||
|
||||
*** Keywords ***
|
||||
Screenshot page
|
||||
Capture Page Screenshot
|
||||
|
||||
Login Should Have Failed
|
||||
Title Should Be Sign In - dotya.ml Gitea Service
|
||||
|
||||
*** Test Cases ***
|
||||
attempt login without creds
|
||||
${chrome_options} = Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
|
||||
Call Method ${chrome_options} add_argument headless
|
||||
Call Method ${chrome_options} add_argument no-sandbox
|
||||
Call Method ${chrome_options} add_argument disable-dev-shm-usage
|
||||
${options}= Call Method ${chrome_options} to_capabilities
|
||||
|
||||
Open Browser ${URL} browser=${BROWSER} desired_capabilities=${options}
|
||||
Set Selenium Speed ${DELAY}
|
||||
Set Window Size 1920 1080
|
||||
|
||||
Maximize Browser Window
|
||||
|
||||
Click Element ${LOGIN_BUTTON}
|
||||
Sleep 0.2
|
||||
Screenshot page
|
||||
Log Location
|
||||
|
||||
Click Element ${SIGN_IN}
|
||||
Sleep 0.2
|
||||
Screenshot page
|
||||
Login Should Have Failed
|
||||
Log Location
|
||||
|
||||
Post-conditions
|
||||
Close Browser
|
Reference in New Issue