TypeError: WebDriver.__init__() got an unexpected keyword argument 'chrome_options'

I am getting below error when i try to use chrome options. Below is the code and error log.
Start Remote Debugger
${path}= Set Variable ${userDir.replace(“\”, “\\”)}\\AppData\\Local\\Microsoft\\Teams\\current\\Teams.exe --remote-debugging-port=7070
Log Getting the path for Remote debugger
Run Process cmd /c ${path} shell=True timeout=None stdout=PIPE stderr=PIPE
Log Starting the debugger mode from command prompt
${chrome_options}= Evaluate sys.modules[‘selenium.webdriver’].ChromeOptions() sys
Call Method ${chrome_options} add_argument --start-maximized
Call Method ${chrome_options} add_experimental_option debuggerAddress
Create Webdriver Chrome chrome_options=${chrome_options}
Sleep 5s

Start Remote Debugger | FAIL |
TypeError: WebDriver.init() got an unexpected keyword argument ‘chrome_options’

Python- Python 3.11.8
robot- Robot Framework 7.0 (Python 3.11.8 on win32)
selenium- Version: 4.18.1
Appium-Python-Client 4.0.0
attrs 23.2.0
certifi 2024.2.2
cffi 1.16.0
decorator 5.1.1
docutils 0.20.1
h11 0.14.0
idna 3.6
kitchen 1.2.6
outcome 1.3.0.post0
pip 24.0
pycparser 2.21
PySocks 1.7.1
robotframework 7.0
robotframework-appiumlibrary 2.0.0
robotframework-pythonlibcore 4.3.0
robotframework-seleniumlibrary 6.2.0
selenium 4.18.1
setuptools 65.5.0
six 1.16.0
sniffio 1.3.1
sortedcontainers 2.4.0
trio 0.24.0
trio-websocket 0.11.1
typing_extensions 4.10.0
urllib3 1.26.18
wsproto 1.2.0

Please help since i am blocked completely

chrome_options has been deprecated since 3.8.0 Selenium release. Its just called “options” now …

1 Like