Small demo

This commit is contained in:
Lillian Violet 2024-03-05 12:58:58 +01:00
parent 4a1b080dda
commit 19e9c6f520

20
main.py
View file

@ -6,10 +6,22 @@ from selenium.webdriver.common.keys import Keys
def gecko_test():
# Set the driver
driver = webdriver.Firefox()
driver.get("https://duck.com")
elem = driver.find_element(By.NAME, "q")
elem.send_keys("seleniumhq" + Keys.RETURN)
sleep(5)
driver.get("https://bol.com")
sleep(1.5)
driver.find_element(By.XPATH, '//*[@id="js-reject-all-button"]').click()
sleep(1.5)
driver.find_element(By.XPATH, "/html/body/wsp-modal-window/div[2]/div[2]/wsp-country-language-modal/button").click()
sleep(2)
driver.find_element(By.XPATH, '/html/body/div[1]/header/div/div[3]/a[1]/span').click()
sleep(2)
driver.find_element(By.XPATH, '//*[@id="react-aria-1"]').send_keys("bol.unusable305@simplelogin.com")
sleep(1.5)
driver.find_element(By.XPATH, '//*[@id="react-aria-5"]').send_keys("&MzxcjzwXWj*fmBf&LT$D5%iDgf&MfZ*")
driver.find_element(By.XPATH, '//*[@id="react-aria-5"]').send_keys(Keys.RETURN)
sleep(100)
klantnummer = int(driver.find_element(By.XPATH, '/html/body/div/main/div/div[1]/div[3]/div/div[1]/div/a/div[1]/ul/li[4]').text)
print(klantnummer[-10:-1])
sleep(100)
driver.quit()
if __name__ == "__main__":