HTML:
<a class="btn btn-sm mb-1 text-white bg-success">10:15 AM</a>
截屏:
我的测试包括以下案例
登录####.live 然后点击“My Providers” 然后转到“specialties” 最后选择一个日期进行预约 这是我的代码
**from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep
browser = webdriver.Chrome()
driver = webdriver.Chrome('./chromedriver')
url = "https://##.live/"
user_name = "##"
password ="###"
driver.get(url)
sleep(3)
signin_link = driver.find_element_by_link_text("Sign In")
signin_link.click()
sleep(10)
username_elem = driver.find_element_by_name("username")
password_elem = driver.find_element_by_id("password")
username_elem.send_keys(user_name)
password_elem.send_keys(password)
signin_button = driver.find_element_by_xpath('//button[text()="Sign In"]')
signin_button.click()
sleep(4)
tab=choose-provider&categories=EVERYDAY_CARE&state=&languages=ENG"]')
shedule_appointment=driver.find_element_by_xpath('//*[@id="root"]/div/section/div/div/div[3]/div[2]/div[2]/article/div/a')
shedule_appointment.click()
driver.find_element_by_link_text('12:00 AM').click()
confirm_appointment=driver.find_element_by_link_text('Confirm').click()
sleep(3)
from selenium.webdriver.support.ui import Select**