Skip to content

Instantly share code, notes, and snippets.

@khanbhai89
Created February 21, 2021 01:38
Show Gist options
  • Save khanbhai89/03e9ecabfef0e56c66eef277180a2ebb to your computer and use it in GitHub Desktop.
Save khanbhai89/03e9ecabfef0e56c66eef277180a2ebb to your computer and use it in GitHub Desktop.
*** Settings ***
Library SeleniumLibrary
Documentation
... My First Test
... This test will Verify Google
*** Keywords ***
Navigate To Google
Open Browser https://www.google.com browser=chrome
Verify Page Contains Google
${Get_title}= Get Title
Should Be Equal As Strings ${Get_title} Google
Close Browser
*** Test Cases ***
Open Google & Verify Google
Navigate To Google
Verify Page Contains Google
@MichaelDimmitt
Copy link

MichaelDimmitt commented Nov 8, 2022

Thanks for this example. 👏
It is oddly hard to find a simple example for this and it is fantastic that this is in one file.

I used an additional file:

requirements.txt

robotframework
robotframework-seleniumlibrary

(bash) Setup a venv and source it: (named env)

brew install python3;
python3 -m pip install --user --upgrade pip;
python3 -m pip install --user virtualenv;
python3 -m venv env;
source env/bin/activate;

(bash) Install from requirements.txt

pip install -r requirements.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment