Skip to content

Instantly share code, notes, and snippets.

@MichaelDimmitt
Forked from khanbhai89/my-first-test.robot
Last active November 8, 2022 16:51
Show Gist options
  • Save MichaelDimmitt/c9ee0ca59b32c996f2ca76d07e774303 to your computer and use it in GitHub Desktop.
Save MichaelDimmitt/c9ee0ca59b32c996f2ca76d07e774303 to your computer and use it in GitHub Desktop.
Robot Framework Basic Tests

Robot-Framework-Selenium getting started with 2 files

  1. my-first-test.robot
  2. requirements.txt

How to install python on a macbook computer

brew install python3;
python3 -m pip install --user --upgrade pip;

How to setup and source venv: (this env is named "env" and is stored in a local folder)

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

How to run this example after setting up python + sourcing venv:

git clone https://gist.github.com/c9ee0ca59b32c996f2ca76d07e774303.git basic-robot-framework-selenium-setup
cd basic-robot-framework-selenium-setup
pip install -r requirements.txt
robot my-first-test.robot

links:

https://www.browserstack.com/guide/robot-framework-and-selenium-tutorial https://medium.com/swlh/robot-framework-the-basics-dfeadc025bea https://www.lambdatest.com/blog/robot-framework-tutorial/

*** 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
robotframework
robotframework-seleniumlibrary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment