# WebDriver.\_\_init\_\_() got an unexpected keyword argument 'service\_log\_path'

**URL:** <https://forum.robotframework.org/t/webdriver-init-got-an-unexpected-keyword-argument-service-log-path/6160>\
**Category:** Robot Framework\
**Created:** [5 September 2023 17:13 UTC](https://forum.robotframework.org/t/webdriver-init-got-an-unexpected-keyword-argument-service-log-path/6160 "2023-09-05T17:13:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanya](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@sanya](https://forum.robotframework.org/u/sanya)\
**Post date:** [5 September 2023 17:13 UTC](https://forum.robotframework.org/t/webdriver-init-got-an-unexpected-keyword-argument-service-log-path/6160/1 "2023-09-05T17:13:22Z")

</div>

Hi, I am getting below error when trying to run for headless chrome:  
WebDriver. **init** () got an unexpected keyword argument ‘service\_log\_path’

code:  
${chrome options}= Evaluate selenium.webdriver.ChromeOptions()  
call method ${chrome options} add\_argument headlesschrome  
call method ${chrome options} add\_argument --no-sandbox  
call method ${chrome options} add\_argument --disable-dev-shm-usage  
call method ${chrome options} add\_argument --ignore-certificate-errors  
Set Global Variable ${global\_downloadDir} ${CURDIR}\Downloads\  
${disabled} Create List Chrome PDF Viewer  
${prefs} Create Dictionary download.default\_directory=${global\_downloadDir} plugins.plugins\_disabled=${disabled}  
Call Method ${chrome options} add\_argument headlesschrome  
Open Browser [https://www.google.com/](https://www.google.com/) headlesschrome  
set selenium implicit wait 5s  
set window size ${1920} ${1080}  
maximize browser window

---

<div class="post-metadata">

**Author:** ![\_daryl](https://avatars.discourse-cdn.com/v4/letter/_/45deac/32.png) [@\_daryl](https://forum.robotframework.org/u/_daryl)\
**Post date:** [5 September 2023 21:56 UTC](https://forum.robotframework.org/t/webdriver-init-got-an-unexpected-keyword-argument-service-log-path/6160/2 "2023-09-05T21:56:39Z")

</div>

It would be worth reading through the below, hard to say if they are running in headless though unfortunately.

> <https://github.com/robotframework/SeleniumLibrary/issues/1835>
>
> Hi,
> 
> When I try to run a robot test I'm getting the following error:
> 
> \`TypeE…rror: WebDriver.\_\_init\_\_() got an unexpected keyword argument 'service\_log\_path'\`
> 
> Similar to this resolved issue: https://github.com/robotframework/SeleniumLibrary/issues/1419
> 
> Although I'm using Chrome and I've already using the latest versions of SeleniumLibarary, Chromedriver and Robot.
> 
> python --version
> Python 3.11.4
> 
> robot --version
> Robot Framework 6.0.2 (Python 3.11.4 on win32)
> 
> chromedriver --version
> ChromeDriver 114.0.5735.90
> 
> I've installed SeleniumLibary today via pip install --upgrade robotframework-seleniumlibrary
> 
> Chrome version: 114.0.5735.110 64 bits
> 
> The project that I'm using is this:
> https://gitlab.com/bftft/robot-framework-testautomationu-2022/-/tree/main/
> 
> An exemple of test that I'm trying to run is this:
> https://gitlab.com/bftft/robot-framework-testautomationu-2022/-/tree/main/005-TestCases
> 
> first-test-case.ansewer.robot
> 
> I appreciate any help.

But you don’t mention that this only happens in headless, and Id hate to assume, but the error do seem to match for what is raised above.

Hopefully this can help in resolving the error
