Thursday reduces the time it takes to get up and running with Selenium.
Project description
Thursday
Thursday reduces the time it takes to get up and running with Selenium.
Installation
Use pip to install thursday as follows:
pip install thursday
Usage (Examples)
Instantiating ChromeDriver
from thursday import By, ChromeDriver, Keys
class Website(ChromeDriver):
def __init__(self):
super().__init__()
Finding WebElements
Arguments:
- by — a selenium locator strategy
- criteria — the search criteria to the locator strategy
foo = self.element_is_present(By.TAG_NAME, "input")
bar = self.element_is_clickable(By.XPATH, '//button[text()="bar"]')
Getting Field Values
Arguments:
- field — the name of the field
@property
def email_address(self):
return self.get_field_value("Email:")
Pressing Keys
Arguments:
- key — a selenium Keys object
- number_of_times — the number of times to press the key
self.press_key(Keys.TAB, 3)
Setting Field Values
Arguments:
- field — the name of the field
- value — the value to set the field to
def login(self, username, password):
self.set_field_value("Username:", "foo")
self.set_field_value("Password:", "bar")
Exceptions
Selenium's ElementNotInteractable, StaleElementReference, and Timeout exceptions can be imported from thursday as follows:
from thursday.exceptions import ElementNotInteractableException, StaleElementReferenceException, TimeoutException
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thursday-0.1a2.tar.gz.
File metadata
- Download URL: thursday-0.1a2.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70a72d9963c97c4416bfdd6cd30723009e399ab7a514d17220c13de0035e4cb9
|
|
| MD5 |
0e4443ea43b9521e64be07128eb81631
|
|
| BLAKE2b-256 |
7c85cf98ec10d04d736aa2b83e28e4b15554ff8d0ec9279430f0b6ccec1e2faa
|
File details
Details for the file thursday-0.1a2-py3-none-any.whl.
File metadata
- Download URL: thursday-0.1a2-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16e1ea25c3428d50159d768f70733e989fbbc156282428de161c5e8622498b62
|
|
| MD5 |
98f4eb88708935140844f1349c5f76e8
|
|
| BLAKE2b-256 |
81b9b03da40d6afae509a905ee09a5d2e6aeb4ec688ad25189c2a881d5a9b0a9
|