Assertion for 3rd radio button is clicked
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
chrome_options = Options()
chrome_options.add_experimental_option("detach", True)
service_obj = Service("C://Users//ancha//chromedriver_win32(4)//chromedriver.exe")
driver = webdriver.Chrome(service= service_obj, options=chrome_options)
driver.get("https://www.rahulshettyacademy.com/AutomationPractice/")
radios = driver.find_elements(By.CSS_SELECTOR, ".radioButton")
radios[2].click()
assert radios[2].is_selected()
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
chrome_options = Options()
chrome_options.add_experimental_option("detach", True)
service_obj = Service("C://Users//ancha//chromedriver_win32(4)//chromedriver.exe")
driver = webdriver.Chrome(service= service_obj, options=chrome_options)
driver.get("https://www.rahulshettyacademy.com/AutomationPractice/")
radios = driver.find_elements(By.CSS_SELECTOR, ".radioButton")
radios[2].click()
assert radios[2].is_selected()
Comments
Post a Comment