Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omaciel/websmith
A Domain Specific Language (DSL) for Web Testing.
https://github.com/omaciel/websmith
Last synced: 12 days ago
JSON representation
A Domain Specific Language (DSL) for Web Testing.
- Host: GitHub
- URL: https://github.com/omaciel/websmith
- Owner: omaciel
- License: gpl-3.0
- Created: 2017-09-14T02:36:08.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-09T23:37:59.000Z (over 4 years ago)
- Last Synced: 2024-07-05T15:17:44.599Z (4 months ago)
- Language: Python
- Size: 32.2 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Websmith
--------A Domain Specific Language (DSL) for Web UI Testing.
How To Use It
+++++++++++++Assuming that you have a `WebDriver` browser object, then::
from websmith.actions import Go, FindByValue, SendKeys
from websmith.ui import Sessionwith Session(browser):
Go('https://www.google.com')
SendKeys('q', 'WebSmith')
FindByValue('Google Search').click()What if you speak a language other than English?
Let's inspect the `Google Search` button::
We can find the button by the attribute `name` with ``FindByName('btnK')`` or
by the CSS `class` with ``FindByCSS('input.gNO89b')``.How To Get A WebDriver Object?
++++++++++++++++++++++++++++++Say you want to control Firefox::
from selenium import webdriver
browser = webdriver.Firefox()