I have a problem with my script. after about 10 times I run the commands below this error comes out:
Timed out receiving message from renderer: 59,996
I use as ubuntu operating system
- selenium version is 3.141.0
- chrome version = 88.0.4324.150
- chromewebdriver = 88.0.4324.96 for linux 64
How can i solve?
I can't understand what this error might be about
import time
import os
import datetime
from selenium import webdriver #importa libreria selenium
from selenium.webdriver.common.keys import Keys #importa funzione per centrare elemento su pagina
from selenium.webdriver.common.action_chains import ActionChains #importa funzione per centrare elemento su pagina
from selenium.webdriver.support.select import Select #importa funzione per selezionare elemento da menu' a discesa
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from logger import logger as l
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.chrome.options import Options
email='email'
password='password'
url='https://www.unieuro.it/online/Console-Playstation-5/PlayStation-5-pidSONPS5DISC' #url del oggetto da tenere monitorato
numerocel='cellular'
chrome_options = Options()
chrome_options.add_argument("--disable-extensions")
chrome_options.add_argument("enable-automation")
#chrome_options.add_argument("--headless")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--dns-prefetch-disable")
chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument("--disable-xss-auditor")
chrome_options.add_argument("--disable-web-security")
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument("--allow-running-insecure-content")
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.set_page_load_timeout(60) # Timeout 15 seconds
#driver = webdriver.Chrome('./chromedriver') # devifinisci il nome del driver
driver.implicitly_wait(60)
driver.maximize_window() #massimizza il browser
driver.get(url) #andare al indirizzo richiesto sul campo url
time.sleep(5) #pausa prima di eseguire il comando successivo
#verifica disponibilità
dis=None
while not dis:
try:
i=None
i = datetime.datetime.now()
print ("Data e ora corrente = %s" % i)
dis=driver.find_element_by_css_selector('a.btn-orange-normal:nth-child(2)') #verifica se è presente il bottone aggiungi al carello
print('in stock unieuro')
except Exception as e:
print('out of stock unieuro')
time.sleep(10)
driver.refresh() #ricarica la pagina e riesegui il controllo
time.sleep(30)