DOM testing library inspired selectors for Robot Framework SeleniumLibrary.
Project description
rf-se-dtl-selectors-plugin
DOM testing library inspired selectors for Robot Framework SeleniumLibrary.
Installation
To install this plugin from PyPI, run:
pip install rf-se-dtl-selectors-plugin
Usage
In order to use selector provided by this plugin, load SeleniumLibrary
with TestingLibrarySelectorsPlugin
in the plugin array:
*** Settings ***
Library SeleniumLibrary plugins=TestingLibrarySelectorsPlugin
The plugin provides alttext
, label
, placeholder
, testid
, text
, and title
selectors. See acceptance_tests directory for usage examples. These locators are automatically registered when the plugin is initialized.
All attribute and text values are passed to normalize-space()
XPath function before comparison with the given value.
In addition to the locator strategies, this plugin provides Get Xpath
keyword to get the XPath expression for given locator. For example:
*** Settings ***
Library SeleniumLibrary plugins=TestingLibrarySelectorsPlugin
*** Test Cases ***
Find elements with xpath
${xpath}= Get Xpath placeholder:Search
Click button xpath:${xpath}
Testing
Check and automatically fix formatting with:
pycodestyle TestingLibrarySelectorsPlugin
autopep8 -aaar --in-place TestingLibrarySelectorsPlugin
Run static analysis with:
pylint -E --enable=invalid-name,unused-import,useless-object-inheritance TestingLibrarySelectorsPlugin
Run acceptance tests in Docker container:
# Build image
docker build . -t atest
# Run tests
docker run --rm atest
# Run tests and get test output to ./out
docker run -v $(pwd)/out:/out --rm atest -d /out -L TRACE:INFO
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
Hashes for rf-se-dtl-selectors-plugin-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2aae47315d465b073a90a6c2ebf305e7d22f313d0434efc7ab8fdce48cf9f493 |
|
MD5 | 5777c92b2d09500335b84b1b8438f25e |
|
BLAKE2b-256 | b4f8b8620b9f5402e5c4b43b1193fb2dc551c4eae90cf6276acc55f080195a67 |