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.1.tar.gz (19.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.1-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for robotframework_okw_web_selenium-0.4.1.tar.gz
Algorithm Hash digest
SHA256 d6ae55e20658bd3eb2a191a1aff3d8c57aef52770d755750610bf44c5262b1e5
MD5 557dd91ad89c59419763182927cc7628
BLAKE2b-256 531efddb1451092797be471cf33cfaf2e1cf296dde4ce90f897433fb2dec60bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_okw_web_selenium-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e8048ab2e619330a94d56bcdc42e636c77ac5e826777e14fca3e338e66011de
MD5 b6d0034831a005c1de0af1dfe270588a
BLAKE2b-256 a0bd1bde0dcb454b7cc3c06fc508891982ac43a78ec0c0e117b7f2b4d587a7ec

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