Skip to content

apptesting-pl/playground-testing-robotframework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apptesting.pl - Robot Framework Test Suite

Comprehensive Robot Framework test suite for apptesting.pl Test Automation Playground using Browser Library (Playwright).

Project Structure

playground-testing-robotframework/
├── tests/                  # Test suites (one per page)
│   ├── home.robot         # Navigation, cards, hero, footer
│   ├── forms.robot        # Text inputs, checkboxes, radios, dropdowns
│   ├── interactions.robot # Drag-drop, clicks, hover, keyboard
│   ├── widgets.robot      # Accordion, tabs, modal, tooltip
│   ├── tables.robot       # Static, sortable, searchable, paginated
│   ├── alerts.robot       # JS alerts, toasts, inline alerts
│   ├── windows.robot      # Iframes, new tab, scrollable
│   ├── files.robot        # Upload, download, restricted types
│   ├── dynamic.robot      # Delayed, AJAX, toggle, countdown
│   └── broken.robot       # Broken images/links, hidden elements
├── resources/              # Shared keywords and variables
│   ├── common.resource    # Reusable keywords
│   └── variables.resource # URLs, browser config
├── fixtures/               # Test data files
│   ├── test-upload.txt
│   └── test-upload-2.txt
├── results/                # Test execution output (gitignored)
├── .venv/                  # Python virtual environment (gitignored)
├── requirements.txt
├── .gitignore
└── README.md

Prerequisites

  • Python 3.10+
  • Node.js 18+ (required by Browser Library's Playwright engine)

Installation

  1. Create and activate virtual environment:
python -m venv .venv

# Windows
.venv\Scripts\activate

# Linux/Mac
source .venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Initialize Browser Library (downloads Playwright browsers):
rfbrowser init

Running Tests

Run the entire suite:

robot --outputdir results tests/

Run a specific test file:

robot --outputdir results tests/forms.robot

Run tests by tag:

robot --outputdir results --include alerts tests/

Run in headed mode (visible browser):

robot --outputdir results --variable HEADLESS:false tests/

Run with a specific browser:

robot --outputdir results --variable BROWSER:firefox tests/

Run a single test case:

robot --outputdir results --test "Page Title Is Correct" tests/home.robot

Important Notes

CSS Selectors with ID

In Robot Framework, the # character starts a comment. To use CSS ID selectors, prefix with css=:

# Correct
Click    css=#my-button

# Wrong - everything after # is treated as comment
Click    #my-button

Browser Library Keywords

This suite uses Browser Library (Playwright-based). Key differences from SeleniumLibrary:

  • Fill Text instead of Input Text
  • Get Property instead of Get Element Attribute for DOM properties
  • Get Attribute for HTML attributes
  • Promise-based alert handling with Promise To and Wait For
  • >>> for iframe piercing (e.g., css=#iframe >>> css=#element)

Test Coverage

Page Test Count Coverage
Home 16 Navigation, cards, hero, footer, links
Forms 28 All input types, validation, submission
Interactions 22 Drag-drop, clicks, hover, keyboard, slider
Widgets 23 Accordion, tabs, modal, tooltip, progress
Tables 23 Static, sortable, searchable, paginated, editable
Alerts 18 JS alerts, confirm, prompt, toasts, inline
Windows 14 Iframe, nested iframe, scrollable
Files 14 Upload, download, restricted types
Dynamic 22 Delayed, AJAX, toggle, countdown, infinite scroll
Broken 24 Broken images/links, hidden, empty elements

Total: ~204 test cases

Tags

Each test file uses a tag matching its page name:

  • home, forms, interactions, widgets, tables
  • alerts, windows, files, dynamic, broken

Troubleshooting

Browser not found

Run rfbrowser init to download Playwright browsers.

Tests timing out

Increase timeout in variables.resource or per-test:

Get Text    css=#slow-element    contains    expected    timeout=30s

Headless issues

Run in headed mode to debug:

robot --variable HEADLESS:false tests/

About

Robot Framework testing on apptesting.pl playground

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors