Task 18 - python selenium architechture & python virtual environment
yogeswaran
Posted on March 23, 2024
Python Selenium Architechture
Selenium is an automation tool used for web application, and python is a programming language. Selenium scripts can be written using only programming languages, the most commonly used programming languages are Java and Python.
Python and selenium work together to create automation scripts and code that are used for interactions with web browsers.
Workflow and architecture steps
- Creating an instance of web driver
- Choosing the appropriate driver for our web browser
- Writing code using python IDE, for interacting with web browser
- Run the code
- Web browser will now automatically perform the operation written as a code.
This above architecture will allow user to automate web browser using python programming language to perform various testings.
Python Virtual Environment
Python virtual environment is an isolated space where user can work on our python projects separately from our system-installed python.
Where user can set up our own libraries and dependencies without affecting the system python.
We can user virtualenv to create python virtual environment.
Virtual Environment
Virtual environment is a tool that helps to keep dependencies required by different projects separate by creating isolated python virtual environments for them. This is the tool used by most python developers.
Example of using Virtual environment
In a scenario where you are working on two web-application projects, one of them uses python 4.18 and other users Python 3.18. In such scenarios, we need to create a virtual environment in python that can be really useful to maintain the dependencies of both projects.
It is a folder structure for unique projects.
** create a new Virtual environment using below commands**
Creating an environment
pip install virtualenvActivating the virtual environment
virtual env
scripts\activateInstall the required package modules using pip command.
Deactivate the virtual environment
Posted on March 23, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 30, 2024
November 30, 2024