So I’m new to Selenium and I was just trying to run a simple test to see if it worked. After installing all the necessary packages (and dealing with some other errors), this message appeared.
My code:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
driver.get('https://www.udemy.com/')
title = driver.title
assert "Udemy" in title
At the terminal, it says my errors start from here:
Traceback (most recent call last):
File "C:Userssindri-21PycharmProjectsPersonal Project - Creating dictionarieswebdrivertests.py", line 5, in <module>
driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
And then:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 1: invalid start byte
Is there any solution?