Chuyên mục:
Python
Cập nhật:
08/12/2024
vd:
from selenium import webdriver
#chrome driver
from selenium.webdriver.chrome.service import Service
#-- Chrome
from selenium.webdriver.common.by import By
# from selenium.webdriver.support.select import Select
service_obj = Service("C:/Users/DELL/Desktop/chromedriver-win64/chromedriver.exe")
driver = webdriver.Chrome(service=service_obj)
driver.get("https://rahulshettyacademy.com/client")
driver.find_element(By.LINK_TEXT,"Forgot password?").click()
driver.find_element(By.XPATH,"//form/div[1]/input").send_keys("demo@gmail.com")
driver.find_element(By.CSS_SELECTOR,"from div:nth-child(2) input").send_keys("Helo@1234")
driver.find_element(By.CSS_SELECTOR,"#confirmPassword").send_keys("Helo@1234")
# driver.find_element(By.XPATH,"//button[@type='submit']").click()
driver.find_element(By.XPATH,"//button[@type='submit']").click()