# AttributeError: 'str' object has no attribute 'path'

**URL:** <https://forum.robotframework.org/t/attributeerror-str-object-has-no-attribute-path/5910>\
**Category:** Robot Framework\
**Created:** [1 July 2023 20:27 UTC](https://forum.robotframework.org/t/attributeerror-str-object-has-no-attribute-path/5910 "2023-07-01T20:27:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaufZamanli](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/raufzamanli/32/2786_2.png) [@RaufZamanli](https://forum.robotframework.org/u/RaufZamanli)\
**Post date:** [1 July 2023 20:27 UTC](https://forum.robotframework.org/t/attributeerror-str-object-has-no-attribute-path/5910/1 "2023-07-01T20:27:20Z")

</div>

Hi everyone, I am facing following error, despite path of chromedriver is correct.

My script:  
\*\*\* Settings \*\*\*  
Documentation To validate the login form  
Library SeleniumLibrary

\*\*\* Test Cases \*\*\*  
Validate UnSuccesful Login  
open the browser with the Mortgage payment url

\*\*\* Keywords \*\*\*  
open the browser with the Mortgage payment url  
Create Webdriver Chrome service=C:\Users\HP Pavilion\Documents\chrome\chromedriver  
Go To [LoginPage Practise | Rahul Shetty Academy](https://rahulshettyacademy.com/loginpagePractise/)

# Errors: Robotframework.Tests.testDemo1 :: To validate the login form

## Validate UnSuccesful Login | FAIL | AttributeError: ‘str’ object has no attribute ‘path’

# Robotframework.Tests.testDemo1 :: To validate the login form | FAIL | 1 test, 0 passed, 1 failed

# Robotframework.Tests | FAIL | 1 test, 0 passed, 1 failed

Robotframework | FAIL |  
1 test, 0 passed, 1 failed

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [1 July 2023 23:33 UTC](https://forum.robotframework.org/t/attributeerror-str-object-has-no-attribute-path/5910/2 "2023-07-01T23:33:50Z")

</div>

Hi Rauf,

Start with the simple things (Though this may just be an issue with when you pasted in the forum, I don’t know so just in case)

Make sure you’ve escaped the backslash in your windows paths:

```python
Create Webdriver Chrome service=C:\Users\HP Pavilion\Documents\chrome\chromedriver

```

Should be:

```python
Create Webdriver Chrome service=C:\\Users\\HP Pavilion\\Documents\\chrome\\chromedriver

```

Beyond that, the next step would be open the log.html file generated by this failed test and see whether the error is coming from `Create Webdriver` or `Go To`, knowing this will help to figure out the problem, and maybe it will have some extra detail.

Dave.

---

<div class="post-metadata">

**Author:** ![RaufZamanli](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/raufzamanli/32/2786_2.png) [@RaufZamanli](https://forum.robotframework.org/u/RaufZamanli)\
**Post date:** [2 July 2023 10:12 UTC](https://forum.robotframework.org/t/attributeerror-str-object-has-no-attribute-path/5910/3 "2023-07-02T10:12:04Z")

</div>

Hi Dave,

Many thanks for your response,

Can you please see attached screenshot from report. Actually, I am new with python and hardly read result.

 ![Capture](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/3/3a6c7b3c3f2105daf39a0a106d013482ec783fd6.png)

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [2 July 2023 11:41 UTC](https://forum.robotframework.org/t/attributeerror-str-object-has-no-attribute-path/5910/4 "2023-07-02T11:41:05Z")

</div>

Hi Rauf,

I’m not that knowledgeable on SeleniumLibrary, and with my limited usage of SeleniumLibrary I never used the `Create Webdriver` keyword myself only the `Open Browser` keyword, so I may not be the best person to help but I’ll try.

The error is coming from `Create Webdriver` which is where I suspected it might be so that’s a good start.

First question is your chromedriver.exe file is it at

- C:\Users\HP Pavilion\Documents\chrome\chromedriver.exe
- C:\Users\HP Pavilion\Documents\chrome\chromedriver\chromedriver.exe.exe
- or somewhere else?

I’d try replacing the `service=` path with the full path to the exe file including the filename and .exe extension

Next where did you get the syntax of `service=`? I don’t see it in the documentation or any online examples, the examples I found use `executable_path=`, so Maybe you should try something like this:

```python
Create Webdriver Chrome executable_path="C:\\Users\\HP Pavilion\\Documents\\chrome\\chromedriver.exe"

```

Hopefully that helps,

Dave.

---

<div class="post-metadata">

**Author:** ![AbishekRaj](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@AbishekRaj](https://forum.robotframework.org/u/AbishekRaj)\
**Post date:** [9 December 2023 05:48 UTC](https://forum.robotframework.org/t/attributeerror-str-object-has-no-attribute-path/5910/6 "2023-12-09T05:48:03Z")

</div>

Hi Rauf,

You can use as below without any attribute

```
`Create Webdriver Chrome C:\Users\winuser\Downloads\Chromedriver.exe`

```
