-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!
Description
🐛 Bug Report
Same story as in this issue
#7359
While try to get html from page with some unicode characters get such exception:
selenium.common.exceptions.WebDriverException: Message: unknown error: bad inspector message
To Reproduce
Install python and selenium.
Run this script:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
parsed_elem = ['.main', 'div[class="grid"]']
def find_elem(e):
try:
elem = browser.find_element_by_css_selector(e)
return elem
except:
pass
url = "https://rajanant.github.io/"
options = Options()
options.add_argument("--no-sandbox")
options.add_argument("--enable-logging")
options.add_argument("--v=1")
options.add_argument("--disable-gpu")
options.add_argument("--window-size=1920,1080")
your_exec_path = "path_to_chromedriver_linux64_83/chromedriver"
browser = webdriver.Chrome(options=options,
executable_path=your_exec_path)
browser.get(url)
try:
divs1 = [x for x in map(find_elem, parsed_elem) if x]
page = divs1[0].get_attribute('innerHTML')
except Exception as e0:
raise e0
finally:
browser.close()
with open('/tmp/file.html', 'w') as tmpf:
tmpf.write(page)
Raises excpetion:
https://github.com/rajanant/rajanant.github.io/blob/master/selenium_bug.txt
Expected behavior
Browser opens web page and save file in /tmp folder. Without any exceptions.
Test script or set of commands reproducing this issue
see To Reproduce section
Environment
OS: Ubuntu 18.04.4 LTS
Browser: Chrome
Browser version: 83.0.4103.97
Browser Driver version: ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416})
Language Bindings version: Python 3.8.3
Selenium Grid version (if applicable): None
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!