Загрузка...

Frontend QA Automation Example With Python & Selenium WebDriver! #qaautomation #selenium #python

Her is an example of frontend automation with Python and Selenium WebDriver. A simple example of a script going to the homepage, clicking a button, and verify the main heading of the page that loads after click.

Start your journey of software testing career with a free course:
https://www.supersqa.com/learn-software-testing

Learn automation and get a tech career with comprehensive training:
https://www.supersqa.com/qa-automation-training
Here is the content of the script in the video:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time

driver = webdriver.Chrome()
driver.implicitly_wait(5)

driver.get("https://www.supersqa.com/")

free_btn = driver.find_element(By.XPATH, "//a[contains(text(), 'Start Learning')]")
free_btn.click()

time.sleep(2)

main_heading = driver.find_element(By.XPATH, '//*[@id="block-1692225279929_0"]/div/h1[1]')
assert main_heading.text == "Software Testing Fundamentals", "Wrong heading"

print("PASS")

driver.quit()

Видео Frontend QA Automation Example With Python & Selenium WebDriver! #qaautomation #selenium #python канала Super SQA
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять