# Selenium using Python

Selenium is an open-source web-based automation tool. Python language is used with Selenium for **Testing**. It has far less verbose and easy to use than any other programming language. The Python APIs empower you to connect with the browser through Selenium. Selenium Python bindings provide a simple API to write functional/acceptance tests using Selenium WebDriver.

**Set up Selenium**

Python version should be less than 3.8: Download.

Create Virtual Environment.

![1.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1656232435311/oCRarfI4Y.png align="left")
Install selenium following this command.

![2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1656232438960/lNcUgQqTS.png align="left")

Install web driver.

![3.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1656232443676/K7i0lIWsJ.png align="left")

You can download ChromeDriver here: https://sites.google.com/chromium.org/driver/

Add it to your system path.

![4.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1656232448091/iMtDaVj88.png align="left")

You can use any editor like VS Code. Create a python file in the directory. For example, we will calculate money heist episode timing from Netflix.

Debugging from the **Netflix** page.

![5.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1656232452850/-DHcAw8Mc.png align="left")

open file fide.py

![6.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1656232456924/izzRCpQmd.png align="left")

Run python code

![7.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1656232461355/rKZcQn46q.png align="left")

Automating chrome window.

![8.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1656232466342/w-4JFNQH4.png align="left")

Calculate Timing.

![9.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1656232470965/KtnnVHrIc.png align="left") .



