Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Robot Framework output
output/
log.html
report.html

# Python
__pycache__/
*.py[cod]
.venv/
venv/

# VS Code
.vscode/

# OS
.DS_Store

# Test artefacts
screenshots/
videos/
results/
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Introduction
This repository contains instructions and scripts for creating and using a Robot Framework environment with the Browser Library.

# Getting Started

## Visual Studio Code Setup
Follow these steps:
1. Run the `create_robot_venv.sh` script in the VS Code terminal.
2. Install the RobotCode extension.
3. Select the Python interpreter from the .venv directory.

# Build and Test
Using RobotCode Extension:
Use **Run Test** from the RobotCode extension.

Using Terminal:
`robot -d results tests/`
29 changes: 29 additions & 0 deletions create_robot_venv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -e

# 1. Navigate to your project root
# cd /path/to/your/project

# 2. Create a virtual environment named .venv
python3 -m venv .venv

# 3. Activate the virtual environment
source .venv/bin/activate

# 4. Upgrade pip
pip install --upgrade pip

# 5. Install Robot Framework and Browser library
pip install robotframework
pip install robotframework-browser

# 6. Initialize Browser library (downloads Playwright browsers)
rfbrowser init

# 7. (Optional) Install extra libraries
# pip install robotframework-seleniumlibrary robotframework-requests

# 8. Freeze dependencies
pip freeze > requirements.txt

echo "✅ Setup complete! Activate with: source .venv/bin/activate"
16 changes: 16 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
click==8.3.1
grpcio==1.76.0
grpcio-tools==1.76.0
natsort==8.4.0
overrides==7.7.0
protobuf==6.33.2
psutil==7.2.1
PyYAML==6.0.3
robotframework==7.4.1
robotframework-assertion-engine==3.0.3
robotframework-browser==19.12.3
robotframework-pythonlibcore==4.4.1
seedir==0.5.1
setuptools==80.9.0
typing_extensions==4.15.0
wrapt==2.0.1
12 changes: 12 additions & 0 deletions tests/sanity/environment_sanity.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*** Settings ***
Library Browser

*** Test Cases ***
Hello World Test
Log Hello, Robot Framework!

Open Example Page
New Browser chromium
New Page https://example.com
Get Title == Example Domain
Close Browser