Task 18 - python selenium architechture & python virtual environment

yogeswaran374

yogeswaran

Posted on March 23, 2024

Task 18 - python selenium architechture & python virtual environment

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

  1. Creating an instance of web driver
  2. Choosing the appropriate driver for our web browser
  3. Writing code using python IDE, for interacting with web browser
  4. Run the code
  5. 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.
Enter fullscreen mode Exit fullscreen mode

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.
Enter fullscreen mode Exit fullscreen mode

** create a new Virtual environment using below commands**

  1. Creating an environment
    pip install virtualenv

  2. Activating the virtual environment
    virtual env
    scripts\activate

  3. Install the required package modules using pip command.

  4. Deactivate the virtual environment

💖 💪 🙅 🚩
yogeswaran374
yogeswaran

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