from time import sleep
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
# todo: options
options = Options()
options.add_argument("start-maximized")
driver = webdriver.Chrome(
service=Service(r'C:\Users\Danil\PycharmProjects\selenium\chromedriver_win32\chromedriver.exe'),
options=options) # Optional argument, if not specified will search path.
# todo: url
driver.get('https://www.dvgups.ru/studtopmenu/student-rating')
sleep(5)
try:
button = driver.find_element(By.ID, 'ctl00_ContentPlaceHolder1_LinkButtonFind')
button.click()
sleep(5)
except Exception as ex:
print(ex)
finally:
driver.close()
driver.quit()
from selenium.webdriver.support import expected_conditions as EC
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.ID, 'ctl00_ContentPlaceHolder1_LinkButtonFind')))
driver.find_element(By.XPATH, ' //a[@id="ctl00_ContentPlaceHolder1_LinkButtonFind"]').click()
from selenium.webdriver.common.action_chains import ActionChains
actions = ActionChains(driver)
actions.move_to_element(element).click()