Pyleniumio

Latest version: v1.21.0

Safety actively analyzes 663890 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

1.5.4

Added

* `WebDriverFactory().build_capabilities()`
* capabilities is a single dictionary instead of a list of dictionaries

Originally I wasn't going to add capabilities because it was going to be deprecated in Selenium 4. However, it seems enough people need it \(including my very own Workfront\) and even with Selenium 4, there will be cases where they are needed.

Also, with the refactor it became very clear that a single dictionary of capabilities was much better than a list of them. This change has been reflected in `pylenium.json` as well as in the CLI args.

{% code title="pylenium.json" %}
python
{
"driver": {
"capabilities": {
"enableVNC": true,
"enableVideo": false,
"name": "value"
}
}
}

{% endcode %}

{% code title="Terminal" %}
python
--caps = '{"name": "value", "boolean": true}'

{% endcode %}

1.5.2

Added

* `EdgeChromiumDriver`
* `Customize DesiredCapabilities`

Details

* `EdgeChromiumDriver`

{% code title="pylenium.json" %}
python
{
"driver": {
"browser": "edge"
}
}

{% endcode %}

{% code title="Terminal" %}
python
--browser="chrome"

{% endcode %}

* `Customize DesiredCapabilities`

javascript
// pylenium.json

{
"driver": {
"capabilities": [
{"name": "value"}
]
}
}


{% code title="Terminal" %}
python
--caps [{"name1": "value1"}, {"name2": "value2"}]

{% endcode %}

1.4.1

Added

* `webdriver_manager`
* `configure pylenium.json`

Details

* `webdriver_manager`

This is the biggest change made in this release. Pylenium now uses `webdriver_manager` to install the necessary driver binaries to the user's machine automatically!

> This means that the user does NOT need to worry about installing them anymore!

Of course, they will still need the actual browser installed, but that's much easier than installing the driver binaries and adding them to the PATH.

This is a great step in making UI Automation with Pylenium a pleasant experience for everyone :\)

* `pylenium.json defaults`

Prior to this release, we would install a `pylenium.json` file at the Project Root alongside our conftest.py. The issue is that this JSON file was meant to be an easy way to control Pylenium's settings \(which it was\), but is overriden every time they would update to a new version of Pylenium...

This also caused issues in CI/CD pipelines because they could not rely on this file to configure Pylenium since installing it fresh in the pipeline would give you a fresh pylenium.json...

This is now taken care of! We are using our BaseModel classes to use defaults that can be overriden two different ways:

1. They can still override them using the CLI options. For example: `pytest tests --browser='opera'`
2. They can create a `pylenium.json` at the Project Root \(same dir as conftest.py\) with the values they want to override. They can also include any other key/value pairs in the `custom` object:

javascript
// pylenium.json

{
driver: {
"wait_time": 5
}
custom = {
"foo": "bar"
}
}


python
use it in code
py.config.custom.get('foo') => yields "bar"

---or---

py.config.custom['foo'] => yields "bar"

1.3.0

Fixed

* Updated the tests in the examples directory
* Fixed an issue when using `PyleniumWait`

Added

* `py.should()` - A collection of expectations for the current driver \( [\15](https://github.com/ElSnoMan/pyleniumio/issues/15) \)
* `Element.should()` - A collection of expectations for the current element \( [\36](https://github.com/ElSnoMan/pyleniumio/issues/36) \)
* `Element.get_property()`
* `Element.is_enabled()`
* `Elements.is_empty()`

1.2.10

Added

* `Element.select(value)` - value can now be the index of the option

1.2.9

Added

* `py.scroll_to(x, y)` - Scroll x and y pixels on the page
* `Element.scroll_into_view()` - Scroll the element into the viewport
* `Element.right_click()` - Right click on the element

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.