Skip to main content

Selenium driver for OKW4Robot - Web GUI test automation with Chrome, Firefox and more.

Project description

OKW Web Selenium

Selenium WebDriver plugin for OKW4Robot — the driver-agnostic keyword library for Robot Framework.

This package provides WebSe_* widget implementations that translate OKW keywords (SetValue, ClickOn, VerifyValue, ...) into Selenium WebDriver calls for Chrome, Firefox, Edge and other browsers.

Deutsche Version: README_de.md


Installation

pip install robotframework-okw-web-selenium

This automatically installs robotframework-okw4robot (core) and robotframework-seleniumlibrary as dependencies.


Quick Start

*** Settings ***
Library    okw_web_selenium.library.OkwWebSeleniumLibrary

*** Test Cases ***
Login Test
    StartApp      MyApp
    SelectWindow  LoginDialog
    SetValue      Username         admin
    SetValue      Password         secret
    ClickOn       Login
    VerifyValue   Status           Logged in

StartApp loads the app YAML (locators/MyApp.yaml). If the YAML contains a __self__ section with the adapter class and browser parameter, the browser is opened automatically — no separate StartHost needed.

All keywords come from the core (okw4robot). This package only provides the Selenium-specific widget implementations — you never import individual keyword modules.


How It Works

OKW4Robot keyword              This package (WebSe_*)
─────────────────              ──────────────────────
SetValue "Name" "Smith"   →   WebSe_TextField.okw_set_value("Smith")
                               └→ Selenium: clear + input_text

ClickOn "Login"           →   WebSe_Button.okw_click()
                               └→ Selenium: click_element

VerifyValue "Status" "OK" →   WebSe_Label.okw_get_value()
                               └→ Selenium: get_text → polling loop

The YAML locator file determines which WebSe_* class is used for each GUI object:

# locators/MyApp.yaml
MyApp:
  LoginDialog:
    Username:
      class: okw_web_selenium.widgets.webse_textfield.WebSe_TextField
      locator: { id: user_input }
    Password:
      class: okw_web_selenium.widgets.webse_textfield.WebSe_TextField
      locator: { id: password_input }
    Login:
      class: okw_web_selenium.widgets.webse_button.WebSe_Button
      locator: { css: "button[type=submit]" }

Widget Classes

Class HTML Elements Key Methods
WebSe_TextField <input>, <textarea> set_value, type_key, get_value, delete
WebSe_Button <button>, <input type=button> click, double_click, get_text
WebSe_CheckBox <input type=checkbox> click, set_value, get_value
WebSe_ComboBox <select>, custom dropdowns select, get_value, get_list_count
WebSe_ListBox <select multiple>, <ul> lists select, get_value, get_list_count
WebSe_RadioList <input type=radio> groups select, get_value
WebSe_Label <span>, <div>, <p>, <label> get_value, get_text
WebSe_Link <a> click, get_text
WebSe_Table <table> get_cell_value, get_row_count, get_headers
WebSe_MultilineField <textarea>, contenteditable set_value, type_key, get_value
BrowserControl Browser host start, stop, select_window
UrlBar Address bar set_value (navigate to URL)

Full reference: docs/widgets_common.md


Documentation

For core documentation (keywords, contracts, timeouts, sync strategy) see robotframework-okw4robot.


Project Structure

robotframework-okw-web-selenium/
  src/okw_web_selenium/
    library.py              # OkwWebSeleniumLibrary (extends OKW4RobotLibrary)
    adapter.py              # SeleniumAdapter (browser lifecycle)
    widgets/
      webse_base.py         # WebSe_Base (shared Selenium logic)
      webse_textfield.py    # WebSe_TextField
      webse_button.py       # WebSe_Button
      webse_checkbox.py     # WebSe_CheckBox
      webse_combobox.py     # WebSe_ComboBox
      webse_listbox.py      # WebSe_ListBox
      webse_radiolist.py    # WebSe_RadioList
      webse_label.py        # WebSe_Label
      webse_link.py         # WebSe_Link
      webse_table.py        # WebSe_Table
      webse_multilinefield.py
      host/
        browsercontrol/     # BrowserControl + UrlBar
    locators/               # Built-in YAML locators (Chrome, WidgetsDemo, ...)
  tests/
    robot/                  # 53 Robot Framework integration tests
  docs/

License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework_okw_web_selenium-0.4.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robotframework_okw_web_selenium-0.4.0-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file robotframework_okw_web_selenium-0.4.0.tar.gz.

File metadata

File hashes

Hashes for robotframework_okw_web_selenium-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ae19eb2f5fa89db24a790e1bf14ebbfb44538b22e2318b1e8f56873d8c9b287f
MD5 72590a03f9376aa41877eb59a7cac64d
BLAKE2b-256 002dfcd4730d27af1639e36fbc8c913b703acc1289805d26aeabed12eb1005bd

See more details on using hashes here.

File details

Details for the file robotframework_okw_web_selenium-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_okw_web_selenium-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4bc4f9cda34499c6150a68ed09c12124e70077278cf3ec8988f42af66982f0f3
MD5 db1d7c32e9f082574eb8f39b9c51861d
BLAKE2b-256 69109044d568d7bb3970e59cd8003ab545eaa49361f20c4a61f606ecfe11286b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page