def check_exists_by_xpath(xpath):
try:
webdriver.find_element_by_xpath(xpath)
except NoSuchElementException:
return False
return True
driver.Manage().Cookies.AddCookie(new Cookie("sessionid", "48257564335%3AxqVRD0uGeXxIor%3A25"));