Metadata-Version: 2.5
Name: spythons
Version: 0.1.0
Summary: Selenium (Software Testing) practical slips: slip-wise code, guides and solved Maven projects
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# spythons

Selenium (Software Testing) practical slips (1 to 21): all code slip-wise with folder structure and file paths, guides with commands, explanations and viva questions, plus a solved Maven project for each slip.

It covers the Selenium question of each slip, not the React question.

## Install

```powershell
python -m pip install spythons
```

## Use

```powershell
spythons              # all code, slip by slip (Enter = next, a = all, q = quit)
spythons code 8       # code of slip 8 only
spythons code --all   # all code without pausing
spythons txt          # save ALL_SLIPS_CODE.txt in the current folder
spythons menu         # interactive menu
spythons list         # all slips
spythons start        # basics: how to write a Selenium practical
spythons show 8       # guide for slip 8
spythons get 8        # copy slip 8 project into .\slip8
spythons export       # copy everything into .\selenium-slips
spythons viva         # viva questions
```

If PowerShell says `spythons` is not recognized, use `python -m spythons` instead, for example `python -m spythons list`.

## Use from Python

```python
import spythons

print(spythons.list_slips())
print(spythons.get_code(1))
print(spythons.get_guide(1))
spythons.export_slip(1, "my_folder")
```

## Slips

| Slip | Topic | Runs with |
|---|---|---|
| 1, 18 | Download a file | main |
| 2, 19 | Take a screenshot | main |
| 3 | Signup button and registration page | main |
| 4, 13 | Verify title and Wikipedia widget | main |
| 5, 20 | Search three keyword combinations | main |
| 6 | TestNG parallel execution | TestNG |
| 7 | Cross browser testing | TestNG |
| 8 | Page Object Model without Page Factory | TestNG |
| 9 | Count and print hyperlinks | main |
| 10 | Find broken links | main |
| 11, 16 | Count radio buttons with testng.xml | TestNG |
| 12 | TestNG invocationCount | TestNG |
| 14 | Register a new user | main |
| 15 | Basic HTML controls | main |
| 17 | Log in and verify the Log out link | main |
| 21 | Page Object Model with Page Factory | TestNG |

## Running a copied project

The package does not include Java, Maven or a browser. Install a JDK (11 or newer), Maven and Google Chrome, then:

```powershell
cd slip8
mvn test                      # TestNG slips
mvn test-compile exec:java    # slips with a main method
```

- Slip 17: change `EMAIL` and `PASSWORD` in `LoginLogout.java` to your own demo account first.
- Slips 5 and 20: Google may show a captcha. Solve it in the browser window.
- Slip 7 uses Chrome, Edge and Firefox.
- The programs open public practice websites, which can change or be offline.

## Rebuild after changing the code

```powershell
python sync.py
python -m build
```
