An attempt at making a UI Automated Testing Framework using Python and Selenium. Influenced by the node.js powered framework, nightwatch.js
$ git clone https://github.com/lpcruz/nightwatch.git
Using Pip for dependencies
$ sudo pip install -r requirements.txt
-
The template folder is a good starting point as it contains each of the dependencies. The template folder is how your new project should look like when beginning.
-
Create a new folder/directory for your project within the Root Directory
nightwatch
-
Within your new Project Folder, you'll need the following files to begin
commands.py
andnightwatch_utils.py
-
For screenshots, create a folder/directory called,
screens
. This is referenced withincommands.py
. This is where your screenshots will be located. -
Create a new file for your test i.e:
mytest.py
-
For reference, please review the template for making a test here
-
You will need to make changes to nightwatch_utils and you can refer here
-
When you're done making your test, make sure that your new project folder contains updated versions of
commands.py
andnightwatch_utils.py
, as well as ascreens
directory
Ensure that you are in the directory where which your new test file is located. Once you're in that directory do the following in terminal:
$ python mytest.py