Skip to main content

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 import ElementNotInteractableException, StaleElementReferenceException, TimeoutException

License

GNU General Public License (v3 only)

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

thursday-0.1a0.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

thursday-0.1a0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file thursday-0.1a0.tar.gz.

File metadata

  • Download URL: thursday-0.1a0.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

Hashes for thursday-0.1a0.tar.gz
Algorithm Hash digest
SHA256 397efc5aee8670293982085b568e6497927ab6d2644611e6a912bfec2f7abf31
MD5 c395c6f62a23c337442f7b96a5a26b3c
BLAKE2b-256 f3bd5aae498014cf3a01c91da73897a1df3ca8a53f8efb852822c6efbcd06d66

See more details on using hashes here.

File details

Details for the file thursday-0.1a0-py3-none-any.whl.

File metadata

  • Download URL: thursday-0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.6

File hashes

Hashes for thursday-0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 37529f96dbd83a9a6d4e1271fa63bad4d52a337afd2feacc3a8358ef898601fb
MD5 98caa02089999bef64b84069b9b24932
BLAKE2b-256 c309973d9732b5ea2d4e440916706def0b946446693bdeaa1d869380a4a339ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page