diff --git a/.drone.yml b/.drone.yml index 3502f8d..db61273 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 diff --git a/test001.robot b/test001.robot index a1f2f8d..30545ee 100644 --- a/test001.robot +++ b/test001.robot @@ -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