driver.add_cookie({'name' : 'szncmpone', 'value' : '1'})
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status
from unknown error: unexpected command response
while True:
try:
driver.get(url)
break
except:
continue
from selenium.webdriver.support import expected_conditions as EC
from selenium import webdriver
import time
from selenium.common import TimeoutException, JavascriptException
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from pyshadow.main import Shadow
options = webdriver.ChromeOptions()
options.add_argument("start-maximized")
driver = webdriver.Chrome(options=options, executable_path=r"D:\Python_lern\shadow_root_pars\chromedriver.exe")
shadow = Shadow(driver)
url = "https://www.firmy.cz/Auto-moto/Auto-moto-prodejci/Autobazary"
driver.get(url)
wait = WebDriverWait(driver, 10)
element = shadow.find_element(By.CSS_SELECTOR, 'div.scmp.scmp_Dialog-wrapper > div > div.scmp_Buttons-wrapper')
driver.quit()
wait = WebDriverWait(driver, 15)
try:
element = wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, 'div.scmp.scmp_Dialog-wrapper > div > div.scmp_Buttons-wrapper > button.scmp_Button.scmp_Button--intro-submit.scmp_Button--submit'))).click()
except TimeoutException as ex:
print('No element')
driver.save_screenshot('wtf.png')
driver.close()
wait = WebDriverWait(driver, 10)
element = wait.until(EC.element_to_be_clickable((By.XPATH, '/html/body/div[20]//div[2]/div/div[2]/button[2]'))).click()
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
Backtrace:
Ordinal0 [0x00486463+2188387]
Ordinal0 [0x0041E461+1762401]
..................................................
RtlSubscribeWnfStateChangeNotification [0x76F81B69+1081]
RtlSubscribeWnfStateChangeNotification [0x76F81B34+1028]
<span class="cart-company-lg__list-link text-body font-weight-400"><a href="https://mokoshaua.com/" target="_blank">https://mokoshaua.com/</a> , <a href="https://www.facebook.com/MokoshaCheese" target="_blank">https://www.facebook.com/MokoshaCheese</a> , <a href="https://www.instagram.com/mokosha_cheese/" target="_blank">https://www.instagram.com/mokosha_cheese/</a></span>