Automation | Selenium with Python | Session 4 - Links, Checkboxes
This session is about applying handling Links & Checkboxes on a webpage.
#Automation, #SeleniumWithPython,
#Checkboxes: -
# to check the status of checkbox available on page.
driver.find_element_by_xpath(“locator").is_selected()
# to select the checkbox
driver.find_element_by_xpath(“locator").click()
#Links: -
# to count/print the links available on a page
count = driver.find_elements(By.TAG_NAME, "a")
print("Links Available on WebPage = ", len(count))
# to click the link:-
driver.find_element_by_link_text(“locator”).click()
driver.find_element_by_partial_link_text(“locator”).click()
Ещё видео!