Skip to main content

SeleNew is a framework over Selenium to simplify UI Test Automation

Project description

SeleNew

SeleNew is a framework over Selenium to simplify UI Test Automation.
SeleNew is a beautified and simplified approach to make your work easy and much faster. Why SeleNew? There is a list of advantages that will help you to implement UI Test Automation in a very simplified way.

  • You don't need to worry about killing the browser. SeleNew will do it for you. This will happen automatically as soon as work with the browser is completed and browser no longer needed.
  • You don't need to worry about the locator search strategy. Whether it's CSS_SELECTOR, XPATH, ID or something else, it doesn't matter, rest assured SeleNew will find the element if there is one on the page.
  • We have the possibility of a go_around in SeleNew. What does it mean? So, it is not a secret and known fact that some elements may be flaky and will not be found for some reason, while they are on the page. SeleNew will go around as long as needed to find it. This option can be easily customized by you. You just need to change the value of the go_around parameter
  • You don't need to worry about waits and struggle with explicit and implicit waits. SeleNew will do it on your behalf. It will wait for the element if the element exists on the page. This option can be easily customized by you. You just need to change the value of the timeout parameter.
  • SeleNew provides clear and beautiful logging and exceptions. It will make your debugging much more easy

Pre-requisites

Python >= 3.8

Getting started

Installation

First install SeleNew by below command

pip install selenew==<version>

To start work using SeleNew please import required components. Example below:

from selenew.base.base_object import Selenew

Let's do it as simple as possible

Use below simplified approach from SeleNew

selenew.send_keys(".search", "search object")

Instead of below complicated approach from Selenium

WebDriverWait(self.driver, 2).until(
            ec.visibility_of_element_located((By.CSS_SELECTOR, ".search"))
        ).send_keys("search object")

SeleNew Built-in functionalities

All go_around, timeout and element_state parameters can be customized as shown below

go_around functionality

Define as many attempts as you like or use the default one. Default value: 3

selenew = SeleNew(browser, go_around=5)

timeout functionality

Define as many times as you like, or use the default one. Default value: 3

selenew.click(".login-button", timeout=5)

element_state functionality

Use one of supported states. Default value: "single_visible"
All supported states:

  • "single_visible"
  • "clickable"
  • "multiple_visible"
  • "invisible"
selenew.click(".login-button", element_state="clickable")

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License.

Author

© 2023 Toghrul Mirzayev

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

selenew-0.0.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

selenew-0.0.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file selenew-0.0.1.tar.gz.

File metadata

  • Download URL: selenew-0.0.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for selenew-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6ffaee589545e29cf30267b70bac892bdd86a2edeed83c3f5540fbff1ea07b39
MD5 91284387c295368c7e29e32a0f3d18a8
BLAKE2b-256 7f50f0502fb21d49b85828f807dddd4344f657c238048eea330e9ad07cb3a35b

See more details on using hashes here.

File details

Details for the file selenew-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: selenew-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for selenew-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b8c8f29cf8470d5bf9910fab95e2fd612280ce921f3d6f539bd930e3677e9ee1
MD5 ffd9a26894ee00af0157a109faf5c2c4
BLAKE2b-256 9650589146af9f29544351792c0cc445e758d596bd6b40e5693f4cce97faf065

See more details on using hashes here.

Supported by

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