Small library with javascript utilities for official Python selenium bindings, supports both Python 2.7 and 3.6.
Lightweight python module to execute frequently used javascript functionality on a Selenium webdriver.
For an all inclusive selenium framework check out py-component-controller!
Official documentation be be read here.
pyselenium-js is a very simple, lightweight module that helps relieve some of the burden of e2e testing with the official Selenium bindings. The official Selenium bindings operate in the most natural way a user would operate against a given web page. The problem with this, is with more advanced and modern websites, these bindings may not always work as expected on custom elements or components.
An example of this being a div tag taking keyboard input, where div tags do not support the onfocus
event listener by design – and the selenium bindings invoke this before attempting to send input to the target DOM.
This project was created using selenium 3.12.0
.
Support is available for both Python 2.7 and 3.4+.
pyselenium-js and can be installed using pip like so,
pip install pyseleniumjs
For more information refer to the official documentation here.
All module related e2e tests are in the pyselenium/tests
subdirectory. To setup your environment run make setup
. To stand up the mock site, run make app
. This will serve the site on localhost:3000
. To run the test suite, use make tests
.
The mock website was created using angular.js 1.6, bulmacss, and webpack 3. It was designed to represent a common website layout with responsive capabilities. To add new features for unit tests, refer to pyjs-mock-site and be sure to update the submodule commit accordingly.
Note as of this time, tests for the Angular 2 bindings are not yet available.
Requirements:
Contributing guidelines are as follows,
pyseleniumjs/tests
subdirectory.
issue-x-username
.Copyright (c) 2018 John Nolette Licensed under the Apache License, Version 2.0.