asger-weirsoee / rest-vaccine-tilmelder

tilmeld dig restvaccine i nordjylland
0 stars 1 forks source link

Aalborg site is failing #2

Open asger-weirsoee opened 3 years ago

asger-weirsoee commented 3 years ago

Probably due to some webpage redesigns the Aalborg module is currently failing.

if you chose do debug this, please remember to use the dummy parameter, so that we don't spam with test-applications :)

Also in main, if you comment out the line with the options for the selenium client, you get a visual confirmation of what is happening, as it won't be run in headless.

https://rn.dk/sundhed/patient-i-region-nordjylland/coronavirus/covid-vaccination/restvacciner

asger-weirsoee commented 3 years ago

Oh yea, and the stacktrace:

File "/home/agw/rest-vac/main.py", line 193, in <module>
    main(args.parse_args())
  File "/home/agw/rest-vac/main.py", line 157, in main
    all_errors[file.name] = do_the_config(file, args)
  File "/home/agw/rest-vac/main.py", line 128, in do_the_config
    all_errors = runner.run(method, args)
  File "/home/agw/rest-vac/main.py", line 70, in run
    b.run(**self.kwargs)
  File "/home/agw/rest-vac/webpages_drivers/DriverClass.py", line 24, in run
    self._go_to_page()
  File "/home/agw/rest-vac/webpages_drivers/aalborg.py", line 22, in _go_to_page
    '/html/body/form/div[4]/div[1]/div/div/div/div/div[3]/div[2]/div/div[1]/div/div[1]/div[4]/div/div/div/ul/li[3]/div/div/div/div/div/div/div/div/div/p[4]/a')
  File "/home/agw/rest-vac/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "/home/agw/rest-vac/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
    'value': value})['value']
  File "/home/agw/rest-vac/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/agw/rest-vac/venv/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: /html/body/form/div[4]/div[1]/div/div/div/div/div[3]/div[2]/div/div[1]/div/div[1]/div[4]/div/div/div/ul/li[3]/div/div/div/div/div/div/div/div/div/p[4]/a