Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/josewebdev2000/selenium-demo

Solutions to Web Automation Challenges using Selenium in Python
https://github.com/josewebdev2000/selenium-demo

automation python python3 selenium selenium-python

Last synced: 3 days ago
JSON representation

Solutions to Web Automation Challenges using Selenium in Python

Awesome Lists containing this project

README

        

# Selenium Demo Exercise Solutions


Python Symbol

Selenium Symbol


Automation Image

---


Solutions of the automation exercises available at
Easy Selenium Demo




Level


Solutions






Basic
Basic Challenges Solutions


Intermediate
Intermediate Challenges Solutions


Advanced
Advanced Challenges Solutions

### Installation and Usage

1. #### Clone this GitHub repository

```bash
git clone https://github.com/josewebdev2000/Selenium-Demo.git
```

2. #### (_Optional_) Create a Python virtual environment for the solutions

```bash
python3 -m venv
```

3. #### Install the required dependencies from the (_requirements.txt_) file

```bash
pip3 -r install requirements.txt
```

4. #### Go to the directory of interest

```bash
cd
```

Example:
```bash
cd basic
```

5. #### Provide required environment variables

There are two environment variables that are required to run any automation script found in this project

```bash
DRIVER_PATH
```

This is the path to the folder that contains the web browser driver.
Since this project uses Firefox. Then, supply the path to your geckodriver

###### Linux Command

```bash
export DRIVER_PATH=
```

###### Windows Command

```bash
set DRIVER_PATH=
```

```bash
BIN_PATH
```

This is the path to the executable binary of the web browser.
Since this project uses Firefox. Then, supply the path to your firefox executable file.

###### Linux Command

```bash
export BIN_PATH=
```

###### Windows Command

```bash
set BIN_PATH=
```

###### Note

If your operating system is Ubuntu the following values have been provided to you by default

```bash
DRIVER_PATH=/usr/local/bin
```

```bash
BIN_PATH=/usr/bin/firefox
```

As a result, as long as the path to the folder to your geckodriver is /usr/local/bin you WON'T need to set up the DRIVER_PATH environment variable.

Likewise, as long as the path to your firefox binary is /usr/bin/firefox you WON'T need to set up the BIN_PATH environment variable.

6. #### Run the challenge solution of interest

```bash
python .py
```

Example:
```bash
python simple_form_solution.py
```