Better Programming

Advice for programmers.

Follow publication

Member-only story

How to Use Selenium to Simulate Manual Actions for Website Tests in Python

Lynn G. Kwong
Better Programming
Published in
5 min readJun 5, 2022
Image by geralt on Pixabay.

Selenium is a tool commonly used to automate website tests in the browser. You can simulate all kinds of manual actions with Selenium. In this post, we will introduce some manual actions that are commonly used in website tests or web scraping.

Preparation

We need to install Selenium and some dependencies before getting started. We should install the libraries in a virtual environment for best practice. It’s recommended to use conda for managing environments because we can install a specific version of Python in each environment.

In order to use the latest version of Selenium, it’s best to use the latest version of Python as well. We will also install the iPython library to run interactive Python code more conveniently. You can copy and paste the Python code shown below in iPython to see the results.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Lynn G. Kwong
Lynn G. Kwong

Written by Lynn G. Kwong

I’m a Software Developer (https://youtube.com/@kwonglynn) keen on sharing thoughts, tutorials, and solutions for the best practice of software development.

Write a response