# When i save the object from spy web it display this type error "cannot save entity:file path length limit exceeded (329/255).You should shorten the name and try again."

**URL:** <https://forum.katalon.com/t/when-i-save-the-object-from-spy-web-it-display-this-type-error-cannot-save-entity-file-path-length-limit-exceeded-329-255-you-should-shorten-the-name-and-try-again/41112>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [March 16, 2020, 6:47am UTC](https://forum.katalon.com/t/when-i-save-the-object-from-spy-web-it-display-this-type-error-cannot-save-entity-file-path-length-limit-exceeded-329-255-you-should-shorten-the-name-and-try-again/41112 "2020-03-16T06:47:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tina.ghaydar](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tina.ghaydar](https://forum.katalon.com/u/tina.ghaydar)\
**Post date:** [March 16, 2020, 6:47am UTC](https://forum.katalon.com/t/when-i-save-the-object-from-spy-web-it-display-this-type-error-cannot-save-entity-file-path-length-limit-exceeded-329-255-you-should-shorten-the-name-and-try-again/41112/1 "2020-03-16T06:47:45Z")

</div>

when i save the object from spy web it display this type error “cannot save entity:file path length limit exceeded (329/255).You should shorten the name and try again.”  
even i am tring with create new folder but still display this type of error.and also tring with change name of object but still facing this issue.  
can anyone please tell me that what can i do in this situation.?  
Here,add the screen short for easily understanding:-

> **[Screenshot](https://prnt.sc/rgzivw)**
>
> Captured with Lightshot

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 16, 2020, 7:07am UTC](https://forum.katalon.com/t/when-i-save-the-object-from-spy-web-it-display-this-type-error-cannot-save-entity-file-path-length-limit-exceeded-329-255-you-should-shorten-the-name-and-try-again/41112/2 "2020-03-16T07:07:31Z")

</div>

Same issue was once discussed and addressed.

> [@"Cannot save entity: file path length limit exceeded(260.255). You should shorten the name and try again" error when I tried to save generated resources by the Web Recorder](http://forum.katalon.com/t/cannot-save-entity-file-path-length-limit-exceeded-260-255-you-should-shorten-the-name-and-try-again-error-when-i-tried-to-save-generated-resources-by-the-web-recorder/22460/10):
>
> Hi everyone, We have already fixed this bug in Katalon Studio version 7.0.0. Please check out the [release note](https://docs.katalon.com/katalon-studio/new/version-70.html#fixes) and upgrade to enjoy Katalon Studio with enhanced performance. Cheers Jass

Which version of Katalon Studio do you use?

---

<div class="post-metadata">

**Author:** ![tina.ghaydar](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tina.ghaydar](https://forum.katalon.com/u/tina.ghaydar)\
**Post date:** [March 16, 2020, 10:23am UTC](https://forum.katalon.com/t/when-i-save-the-object-from-spy-web-it-display-this-type-error-cannot-save-entity-file-path-length-limit-exceeded-329-255-you-should-shorten-the-name-and-try-again/41112/3 "2020-03-16T10:23:02Z")

</div>

i am using the version of 7.2.6 but still facing this issue.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 16, 2020, 11:29am UTC](https://forum.katalon.com/t/when-i-save-the-object-from-spy-web-it-display-this-type-error-cannot-save-entity-file-path-length-limit-exceeded-329-255-you-should-shorten-the-name-and-try-again/41112/4 "2020-03-16T11:29:41Z")

</div>

Hey, @Jass. @ThanhTo. Do you hear us?

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 16, 2020, 11:38am UTC](https://forum.katalon.com/t/when-i-save-the-object-from-spy-web-it-display-this-type-error-cannot-save-entity-file-path-length-limit-exceeded-329-255-you-should-shorten-the-name-and-try-again/41112/5 "2020-03-16T11:38:10Z")

</div>

![CannotSaveEntity2](https://europe1.discourse-cdn.com/katalon/original/2X/6/68dda478c58291b02cbf3073fc849f4f7f21ca4e.png)

Ah, this is an unfortunate case. The locator contains a lot of whitespaces

The message says “file path length limit exceeded”. I guess, the message is inappropriate. May be it should have said “locator is too long”. I am not sure.

You can edit the expression manually to:

```auto
//*[contains(text(),'Shoes(22)')]

```

This expression is semantically equivalent to the original, and is much shorter.

I guess, it would be successfully saved.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 16, 2020, 12:04pm UTC](https://forum.katalon.com/t/when-i-save-the-object-from-spy-web-it-display-this-type-error-cannot-save-entity-file-path-length-limit-exceeded-329-255-you-should-shorten-the-name-and-try-again/41112/6 "2020-03-16T12:04:17Z")

</div>

@Jass

You can improve the Recorder tool. Currently it generates this:

```auto
//*[text()='xxxxxxxxxxxxxxxxxxxx' or .= 'xxxxxxxxxxxxxxxxxxxx']

```

This is verbose. The following one is equivalent, and much shorter.

```auto
//*[text()='xxxxxxxxxxxxxxxxxxxx']

```

And the following one would be better:

```auto
//*[contains(text(),'wwww')]

```

where `wwww` is a shorter string derived from `xxxxxxxxxxxxxxxxxxxx` by triming leading and trailing whitespace characters including `&nbsp;`.
