I am trying to do some tests using GitLab CI/CD and Robot Framework, I have this simple .robot
file:
*** Settings ***
# Declare Libraries
Library SeleniumLibrary
# Declare Suite Setup and Teardown
Suite Setup Open Browser ${site_to_open} ${browser_to_use}
Suite Teardown Close Browser
*** Variables ***
${site_to_open} https://example.com/
${browser_to_use} chrome
*** Test Cases ***
Open webpage and check for text
Page Should Contain Check for existence of this text!!!
Log OK
In my .gitlab-ci.yml I have this
stages:
- deploy
- tests1
pages:
stage: deploy
script:
- mkdir .public
- cp test_website/index.html .public
- mv .public public
artifacts:
paths:
- public
only:
- master
tests1:
stage: tests1
services:
- selenium/standalone-chrome
script:
- python3 -V
- apt-get update
- apt-get install -y python3-pip
- pip3 -V
- pip3 install robotframework
- pip3 install robotframework-seleniumlibrary
- apt-get install -y chromium-chromedriver
- export PATH=$PATH:$HOME/bin
- robot --output NONE --report NONE --log NONE cases/Test/test.robot
only:
- master
However when I try to run the pipeline it gives me this error:
$ apt-get install -y chromium-chromedriver
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package chromium-chromedriver
Cleaning up file based variables
ERROR: Job failed: exit code 1
Whatever I am doing, I am failing to sucessfully instal the chromium-webdriver to run the Robot Framework test as in headless Chrome.
Could you suggest how to edit the files to make it work?