<commit_before># PySelenium ![Alt text](https://travis-ci.org/felipefiali/PySelenium.svg?branch=master "")  [![Coverage Status](https://coveralls.io/repos/github/felipefiali/PySelenium/badge.svg)](https://coveralls.io/github/felipefiali/PySelenium)
A Python package that uses Selenium to enable for automating tests for web applications.

## Setup instructions

* Get Google Chrome's driver from https://sites.google.com/a/chromium.org/chromedriver/downloads

* Put the web driver executable in any folder and add that folder to $PATH

* Run `pip install pyselenium` 

## Usage

After successfully going through the setup instructions, you can start programming your tests like so:

```python
test = Test('My test')
test.add_step(Navigate('http://www.google.com'))
test.add_step(TypeText(css_path='#lst-ib', hint='Google search bar', text='Automating a Google search'))
test.add_step(SendEnter())
test_runner = TestRunner(test)
test_result = test_runner.run_test()

print(test_result)
```

## Sample test

You can find a sample test in [pyselenium/sample_test.py](https://github.com/felipefiali/PySelenium/blob/master/pyselenium/sample_test.py)

## List of available test steps

These are the test steps currently available to be used:

### Navigate<commit_msg>Editing the sample Python code on the README file.<commit_after># PySelenium ![Alt text](https://travis-ci.org/felipefiali/PySelenium.svg?branch=master "")  [![Coverage Status](https://coveralls.io/repos/github/felipefiali/PySelenium/badge.svg)](https://coveralls.io/github/felipefiali/PySelenium)
A Python package that uses Selenium to enable for automating tests for web applications.

## Setup instructions

* Get Google Chrome's driver from https://sites.google.com/a/chromium.org/chromedriver/downloads

* Put the web driver executable in any folder and add that folder to $PATH

* Run `pip install pyselenium` 

## Usage

After successfully going through the setup instructions, you can start programming your tests like so:

```python
from pyselenium.test_metadata import Test
from pyselenium.test_steps import *
from pyselenium.test_runner import *

test = Test('My test')
test.add_step(Navigate('http://www.google.com'))
test.add_step(TypeText(css_path='#lst-ib', hint='Google search bar', text='Automating a Google search'))
test.add_step(SendEnter())
test_runner = TestRunner(test)
test_result = test_runner.run_test()

print(test_result)
```

## Sample test

You can find a sample test in [pyselenium/sample_test.py](https://github.com/felipefiali/PySelenium/blob/master/pyselenium/sample_test.py)

## List of available test steps

These are the test steps currently available to be used:

### Navigate
{'fraction_non_alphanumeric': 0.11514018691588786, 'fraction_numerical': 0.0, 'mean_word_length': 5.69, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3328114', 'n_tokens_mistral': 864, 'n_tokens_neox': 835, 'n_words': 231}