A package around `selenium` offering, among other features, an implementation of Page Object Model, an enhanced WebDriver and a `find` function to quickly retrieve elements.
Project description
🌔 manen
A package around selenium
to easily construct Python objects which reflect the DOM of any webpages.
🚧
📥 Installation
pip install manen
🚀 Getting started
import manen.page_object_model as pom
class HomePage(pom.Page):
query = pom.InputElement("input[id='search']")
class SearchResultPage(pom.Page):
class ResultRegions(pom.Regions):
name = pom.TextElement("h3 span.package-snippet__name")
version = pom.TextElement("h3 span.package-snippet__version")
link = pom.LinkElement("a.package-snippet")
description = pom.TextElement("p.package-snippet__description")
n_results = pom.IntegerElement("//*[@id='content']//form/div[1]/div[1]/p/strong")
results = ResultRegions("ul[aria-label='Search results'] li")
✨ Features
manen.finder.find
allows to easily get element(s) in a HTML page. This function support several very different use cases, mainly parametrized with the function arguments.manen.resource
is a module to easily interact with all the assets needed byselenium
. It allows for example to download all the drivers required to work with Selenium.manen.browser
defined browsers objects, an enhanced Selenium's webdrivermanen.page_object_model
is the implementation of page object modelling, described in Selenium documentation. Thanks to that, you can describe the DOM structure only with Python objects.- a CLI is shipped with the initial release in order to perform operations such as downloading webdriver
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
manen-0.1.0.tar.gz
(35.0 kB
view hashes)
Built Distribution
manen-0.1.0-py3-none-any.whl
(37.8 kB
view hashes)