[PYTHON] What to do if an error message "There was a problem displaying this web page" is displayed in Chrome's Web Driver (Selenium)

Phenomenon occurring

When I started Chrome's WebDriver (Selenium) in Python, the following error was displayed. image.png

After investigating, it seems that Chrome's WebDriver (Selenium) has crashed. This time, I will create it as a reminder about how to deal with it.

How to respond

There was an article on Qiita about what to do if Chrome in a production environment crashes. https://qiita.com/kazuki_hamatake/items/b37602254d6fed295475

When I referred to the article, I found that the shortcut for Chrome was --disable-features = RendererCodeIntegrity. It will be solved if you add it.

If you load this as an option of WebDriver (Selenium), it seems to be solved.

code

The code is below. Create an argument for --disable-features = RendererCodeIntegrity in options.add_argument and I'm passing it to the webdriver.

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import chromedriver_binary

#Launch browser
options = Options()
options.add_argument('--disable-features=RendererCodeIntegrity')
driver = webdriver.Chrome(options=options)

#Access the Google search screen
driver.get('https://www.google.co.jp/')

#Exit the browser
driver.quit()

Recommended Posts

What to do if an error message "There was a problem displaying this web page" is displayed in Chrome's Web Driver (Selenium)
What to do if a version error occurs in the selenium Chrome driver
What to do when a warning message is displayed in pip list
What to do if you get an error when trying to send a message in tasks.loop () immediately after startup
What to do if a 0xC0000005 error occurs in tf.train.start_queue_runners ()
What to do if pip --user returns an error in a virtual environment created with pyenv
What to do if PyInstaller3.5 gives an error in Python3.8 (TypeError: an integer is required (got type bytes))
[Python] What to do if an error occurs in pip (pyinstaller, pyautogui, etc.)
What to do if you get a "No versions found" error in pipenv
What to do if a Unicode Encode Error occurs in Sublime Text Python
What to do if abort is displayed when inputting camera video in OpenCV
What to do if the print command itself causes an error in Maya python
What to do if you get an error when importing matplotlib in Python (Mac)
What to do if the progress bar is not displayed in tqdm of python
What to do if Python IntelliSense is not displayed in VS Code on Windows
What to do if a UnicodeDecodeError occurs in pip
What to do if you run python in IntelliJ and end with an error
What to do when there is no response due to Proxy setting in Python web scraping
What to do if the image is not displayed using matplotlib etc. in the Docker container
What to do if you get a Cannot retrieve metalink for repository error in yum
What to do if you get an error when running "certbot renew" in CakePHP environment
What to do if ʻarguments [0] .scrollIntoView ();` fails in python selenium
What to do if pip gives a DistributionError in Homebrew
What to do if you get an error saying c compiler cannot create executables in configure
What to do if you get a must override `get_config` error when trying to model.save in Keras
What to do if you get a minus zero in Python
What to do if "Unnamed: 0" is added in to_csv-> read_csv in pandas
How to write what to do when an application is first displayed in Qt for Python with Designer
What to do if a symbolic link error occurs in import cv while trying to install OpenCV in Python
What to do if an error occurs in TensorFlow RNN related import or RNN (LSTM) Cell (v 0.11r ~)
What to do if you get the error RuntimeError: Python is not installed as a framework when trying to use matplitlib and pylab in Python 3.3
What to do if pyenv install does not proceed with an error
[Python] What to do when an error related to SSL authentication is returned
What to do if an error occurs when importing numpy with VScode
What to do if you get an error when trying to load mnist
What to do if you get an error when installing Dlib (Ubuntu)
[OSX] [pyenv] What to do when an SSL error occurs in pip
What to do if an error occurs when loading a python project created with poetry into VS Code
What I was addicted to when creating a web application in a windows environment
[python] What to do when an error occurs in send_keys of headless chrome
What to do if Django can't load an image from a static folder
What to do if you get an error when installing python with pyenv
What to do if NotADirectoryError: [Errno 20] Not a directory:'xdg-settings' appears in jupyter notebook
What to do if an SSL connection error (ssl.SSLError: [SSL: DH_KEY_TOO_SMALL]) occurs on Ubuntu 20.04
What to do if (base) is displayed at the beginning of the Mac terminal
What to do if you get a Call with too many input arguments error at DoAndReturn in a golang test
What to do if pipreqs results in UnicodeDecodeError
[Python] Type Error:'WebElement' object is not iterable What to do when an error occurs
What to do if you get an "unknown service" error from your gRPC server
What to do if you get an OpenSSL error when installing Python 2 with pyenv
What to do if you get a memory error when converting from PySparkDataFrame to PandasDataFrame
What to do when only the window is displayed and nothing is displayed in pygame Note
What to do if you get "(35,'SSL connect error')" in pycurl (one of them)
What to do if you get an Import Error when importing matplotlib with Jupyter
What to do if the message "Not recognized as an internal or external command, operable program or batch file" is displayed when executing the conda command after installing Miniconda.