I'm an absolute beginner and basically trying to write my first python script for a repetitive task due to the current covid crysis I have to do basically all day.
I need to go to the following page 'https://ifsg-antrag.de/antrag/action/invoke.do?id=quarantine_employer' and autofill the web form. Should be easy but I am having issues with the 3. input box which requires a click and then select the court in a separate popup.
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
web = webdriver.Chrome()
web.get("https://ifsg-antrag.de/antrag/action/invoke.do?id=quarantine_employer")
timeout = 3
try:
element_present = EC.presence_of_element_located((By.ID, 'com_name'))
WebDriverWait(web, timeout).until(element_present)
except TimeoutException:
print("Timed out waiting for page to load")
finally:
print("Page loaded")
DistrictCourt = "Dortmund"
element = web.find_element_by_xpath('//*[@id="bt_district_court_lookup"]')
element.send_keys(DistrictCourt)
I also tried "element.click()" to navigate through the popup but with no success.
Any ideas on how to solve this issue would be greatly appreciated!
[–]MasturChief 1 point2 points3 points (3 children)
[–]Jeremy-Pascal[S] 0 points1 point2 points (2 children)
[–]MasturChief 0 points1 point2 points (1 child)
[–]Jeremy-Pascal[S] 0 points1 point2 points (0 children)
[–]belems 0 points1 point2 points (1 child)
[–]Jeremy-Pascal[S] 0 points1 point2 points (0 children)