I am trying to specify three different cookies for a website's 3 different paths. But when I specify a path, the add_cookie() method acts differently and changes the domain I gave to it. It places a dot at the beginning of the domain.
I added a dummy cookie for this but this happens every time. Let me share the code.
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("https://icp.administracionelectronica.gob.es/icpplustiem/index.html")
name = "x"
value = "y"
domain = "icp.administracionelectronica.gob.es"
path = "/sjsjsjsjsj"
driver.add_cookie({'name': name, 'value': value, 'domain': domain, "path": path})
I simply go to the website to not take InvalidDomainException and add the cookies. But it changes the domain. So it doesn't use the cookie I added in the necessary requests.