Created
May 31, 2024 15:09
-
-
Save SarahElson/8d3339c0139cc33ccc33828e3458a257 to your computer and use it in GitHub Desktop.
What Is Parallel Testing And Why Is It Important?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import the required packages | |
from selenium import webdriver | |
# Function to retrieve the title of the web page | |
def get_title(): | |
# Configure Chrome WebDriver options | |
options = webdriver.ChromeOptions() | |
options.add_experimental_option('excludeSwitches', ['enable-logging']) | |
# Initialize Chrome WebDriver | |
driver = webdriver.Chrome(options=options) | |
# Open the specified URL | |
driver.get("https://ecommerce-playground.lambdatest.io/") | |
# Return the title of the web page | |
return driver.title | |
# Function to retrieve the length of the title of the web page | |
def get_title_length(): | |
# Configure Chrome WebDriver options | |
options = webdriver.ChromeOptions() | |
options.add_experimental_option('excludeSwitches', ['enable-logging']) | |
# Initialize Chrome WebDriver | |
driver = webdriver.Chrome(options=options) | |
# Open the specified URL | |
driver.get("https://ecommerce-playground.lambdatest.io/") | |
# Return the length of the title of the web page | |
return len(driver.title) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment