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 Install selenium following this command.

2.png

Install web driver.

3.png

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

Add it to your system path.

4.png

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

open file fide.py

6.png

Run python code

7.png

Automating chrome window.

8.png

Calculate Timing.

9.png .