Releases: ElSnoMan/pyleniumio
Experimental Options and Page Load Wait Time
1.6.0 - 2020-04-28
Added
#79 Page Load Wait Time
#77 Test Case Name into Capabilities for frameworks like Selenoid
#78 Add Experimental Options via pylenium.json
Details
Page Load Wait Time
By default, the Page Load timeout is 0
just like Selenium. However, there were cases where users wanted to control this globally or as needed per test case. You can now do this a few different ways:
# set it globally in CLI
--page_load_wait_time 10
// set it globally in pylenium.json
{
"page_load_wait_time": 10
}
# override the global page_load_wait_time just for the current test
py.set_page_load_timeout(10)
Test Case Name into Capabilities
This was primarily for other frameworks like Selenoid and Zalenium that used this name to label the tests in their runners. For example, in Selenoid, you can filter tests by name. Before this change, the tests were given an unhelpful, generic name instead of the proper test name. That's fixed now :)
Add Experimental Options
For users that want to use some of the experimental options for browsers, you can now do this within pylenium.json
. This is a list of dictionaries (key-value pairs) that you want to include globally.
{
"experimental_options": [
{"useAutomationExtension": false},
{"otherName": "value"}
]
}
Desired Capabilities as a single dictionary
1.5.4 2020-04-27
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.
EdgeChromiumDriver and capabilities support
1.5.1 - 2020-04-24
Added
- Pass in capabilities via CLI
--caps [{"name1": "value1"}, {"name2": "value2"}]
Fixed
- Bug with RemoteDriver not having proper, default capabilities
Edge Chromium Support
1.5.0 2020-04-24
Added
- Edge Chromium Support
You can now specify edge
as a driver!
{
"browser": "edge"
}
or via the CLI
--browser=edge
- Added Capabilites to
pylenium.json
{
"capabilities": [
{"name": "value"}
]
}
webdriver_manager and pylenium.json defaults
1.4.1 - 2020-04-17
Added
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:
- They can still override them using the CLI options. For example:
pytest tests --browser='opera'
- 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 thecustom
object:
// pylenium.json
{
driver: {
"wait_time": 5
}
custom = {
"foo": "bar"
}
}
# use it in code
py.config.custom.get('foo') # => yields "bar"
---or---
py.config.custom['foo'] # => yields "bar"
Should
1.3.0 - 2020-04-05
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 )Element.should()
- A collection of expectations for the current element ( #36 )Element.get_property()
Element.is_enabled()
Elements.is_empty()
Notes
As always, check out the official documentation for the more details and examples of the implementations. This was a big release, so there's a lot to read through :)
Scrolling and Right-click
1.2.9 - 2020-03-23
Added
py.scroll_to(x, y)
- Scroll x and y pixels on the pageElement.scroll_into_view()
- Scroll the element into the viewportElement.right_click()
- Right click on the element
PyleniumWait and custom timeouts
1.2.8 - 2020-03-21
Fixed
- DesiredCapabilities error if user had an old version of chromedriver
- py.switch_to.frame() wasn't switching to frame properly
Added
- PyleniumWait
- Pylenium Commands > wait - doc with Usage examples
Changed
- Custom timeouts to some commands, like .get(), to override global wait_time in pylenium.json