/images/avatar.png

Hi! I'm Pratyaksha.

Solid Design Principles

SOLID is a set design principles in object-oriented context to make maintainable, testable and extendable software. Single Responsibility A class should only have one responsibility. Furthermore, it should only have one reason to change. Benefits: Testing: A class with one responsibility will have far fewer test cases. Lower coupling: Less functionality in a single class will have fewer dependencies. Organization: Smaller, well-organized classes are easier to search than monolithic ones. Example Bad A class representing a book:

Selenium Cheat Sheet

Info This post assumes prior knowledge of python and selenium 4 Installation Selenium: pip install selenium Download the drivers, make sure that your browser, selenium and driver versions are compatible with each other. Chrome: https://chromedriver.chromium.org/downloads Firefox: https://github.com/mozilla/geckodriver/releases Edge: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ Instantiate your driver Chrome 1 2 from selenium import webdriver driver = webdriver.Chrome(executable_path="C:/webdrivers/chromedriver.exe") With custom options 1 2 3 4 5 6 7 from selenium import webdriver from selenium.webdriver.chrome.options import Options options = Options() ## option to not show an open browser window options.