First Commit

This commit is contained in:
Debucquoy Anthony 2023-04-19 10:17:38 +02:00
commit 588dcece08
Signed by: tonitch
GPG Key ID: A78D6421F083D42E
2 changed files with 18 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
venv/
geckodriver.log

16
main.py Normal file
View File

@ -0,0 +1,16 @@
from time import sleep
from selenium import webdriver
from selenium.webdriver import common
from selenium.webdriver.support import ui, expected_conditions
if __name__ == "__main__":
opts = webdriver.FirefoxOptions()
# opts.add_argument("-headless")
webd = webdriver.Firefox(options=opts)
webd.get("https://hplanning2022.umons.ac.be")
horaires = ui.WebDriverWait(webd, 3).until(expected_conditions.presence_of_element_located((common.by.By.XPATH, "/html/body/div[1]/div[3]/div[3]/div[2]/div[1]/div/ul/li[4]/b/a/div")))
horaires.click()
cours = ui.WebDriverWait(webd, 3).until(expected_conditions.presence_of_element_located((common.by.By.XPATH, '//*[@id="GInterface.Instances[1].Instances[1].bouton_Edit"]')))
cours.click()