driver.find_element(By.XPATH, "[div@aria-label='Sat Dec 17 2022']").click()
selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression [div@aria-label='Sat Dec 17 2022'] because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '[div@aria-label='Sat Dec 17 2022']' is not a valid XPath expression.
import requests
e_url = "https://www.test.portal.eturista.gov.rs/prijava"
# e_url = "https://www.test.portal.eturista.gov.rs/eturistwebapi/api/Autentifikacija/PrijavaKorisnickoImeLozinka"
auth = { 'korisnickoIme': '//лог', 'lozinka': '//пасс' }
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/97.0.4692.99 Safari/537.36',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip, deflate',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1'}
with requests.Session() as s:
p = s.post(e_url, headers=headers, data=auth)
print(p)