overhauled testing logic + fix headless browser
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
surtur 2020-03-05 02:56:19 +01:00
parent b64d09df27
commit fc39590475
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 20 additions and 14 deletions

@ -1,22 +1,33 @@
---
kind: pipeline
name: test001
name: test-set-default
platform:
arch: amd64
steps:
- name: open-website
- name: reveal-env
pull: always
image: immawanderer/archlinux-rf
commands:
- uname -r
- python --version
- robot --version
- ls -la
- name: test001
pull: if-not-exists
image: immawanderer/archlinux-rf
volumes:
- name: shm
path: /dev/shm
commands:
- uname -r
- python --version
- ls -la
- START_XVFB=false robot test001.robot
- robot test001.robot
- name: report
pull: if-not-exists
image: immawanderer/archlinux-rf
commands:
- cat log.html
- cat output.html
- cat report.hmtl

@ -3,23 +3,18 @@ Library SeleniumLibrary run_on_failure=Nothing
*** Variables ***
${URL} https://drone.dotya.ml/wanderer/docker-archlinux-cdev/
${BROWSER} Chrome
${BROWSER} headlesschrome
${RANDELEM} //section[@class='repo-item build-yes active-yes']
*** Test Cases ***
TC_001 - open browser and go to url
${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
Call Method ${chrome options} add_argument headless
Call Method ${chrome options} add_argument disable-gpu
${options}= Call Method ${chrome_options} to_capabilities
Set Selenium Speed 0.2
Open Browser ${URL} ${BROWSER} desired_capabilities=${options}
Open Browser ${URL} ${BROWSER}
Wait Until Element Is Visible ${RANDELEM}
Click Element ${RANDELEM}
Log Location
Sleep 2
Capture Page Screenshot filename=screen.png
Capture Page Screenshot
Post-conditions
Close Browser