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

All widget classes inherit click, move_over, get_tooltip, get_label, get_attribute, get_placeholder from WebSe_Base. | 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.2.tar.gz (20.5 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.2-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for robotframework_okw_web_selenium-0.4.2.tar.gz
Algorithm Hash digest
SHA256 4584c191069d51496e2334cb379bc6ed056123ee776796e62ec8fc01e58f4106
MD5 ec689375a03344b7c54c2b5099d82853
BLAKE2b-256 e153dc86f9a0d8ecac29f3fc1a852d5cfa77f40051ba4741ccba750a9304d8e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_okw_web_selenium-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f7ae001931e9259683ae66d21e97edbd8da08e9e251510f4ce95031cb3261da3
MD5 31513efacefb8988f9d720398f84db6a
BLAKE2b-256 3cb93619b1893b1ab53b8a99b125190001e8cb18bf9395a72179a2b5d74939c0

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