# Autocomplete | Not able to select the selector for a table of autocomplete values

**URL:** <https://forum.robotframework.org/t/autocomplete-not-able-to-select-the-selector-for-a-table-of-autocomplete-values/7479>\
**Category:** Browser\
**Created:** [25 June 2024 13:24 UTC](https://forum.robotframework.org/t/autocomplete-not-able-to-select-the-selector-for-a-table-of-autocomplete-values/7479 "2024-06-25T13:24:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteL](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@SteL](https://forum.robotframework.org/u/SteL)\
**Post date:** [25 June 2024 13:24 UTC](https://forum.robotframework.org/t/autocomplete-not-able-to-select-the-selector-for-a-table-of-autocomplete-values/7479/1 "2024-06-25T13:24:26Z")

</div>

Hello,  
I have a table where business contacts can be added. This table includes an autocomplete field that suggests contacts as you type. Each contact has an associated ID, but there are four different possible IDs for each contact. Because of these varying IDs, I’m having trouble assigning the correct selector for the user name input field. Could you help me with a solution to correctly assign the selector for entering the user name?

On the left side is the table where I have to enter the name. The right side shows the corresponding elements. The ID is eb7f43c44. I have tried different ways to enter the name for the correct selector but it doesn’t work. With Selenium it was really easy to just use “name=”$PpyWorkPage$pProjectDetails$pCounterParts$l2$pUserIdentifier" but with Browser libary it is not possible to use this.

Maybe someone have an idea. Thanks

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/3/30634d29a17518a63a7f80132152a71e1ef46c20.jpeg)

---

<div class="post-metadata">

**Author:** ![falcon030](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/falcon030/32/3420_2.png) [@falcon030](https://forum.robotframework.org/u/falcon030)\
**Post date:** [25 June 2024 13:37 UTC](https://forum.robotframework.org/t/autocomplete-not-able-to-select-the-selector-for-a-table-of-autocomplete-values/7479/2 "2024-06-25T13:37:59Z")

</div>

@SteL What happens if you use

> name=”$PpyWorkPage$pProjectDetails$pCounterParts$l2$pUserIdentifier" \>\> visible=“true”

---

<div class="post-metadata">

**Author:** ![SteL](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@SteL](https://forum.robotframework.org/u/SteL)\
**Post date:** [25 June 2024 13:59 UTC](https://forum.robotframework.org/t/autocomplete-not-able-to-select-the-selector-for-a-table-of-autocomplete-values/7479/3 "2024-06-25T13:59:54Z")

</div>

Hi,

I get this issue.

“Error: locator.fill: Unknown engine “name” while parsing selector name=”$PpyWorkPage$pProjectDetails$pCounterParts$l2$pUserIdentifier” \>\> visible=“true”  
Call log:

- waiting for locator(‘name=”$PpyWorkPage$pProjectDetails$pCounterParts$l2$pUserIdentifier" \>\> visible=“true”’)"

---

<div class="post-metadata">

**Author:** ![falcon030](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/falcon030/32/3420_2.png) [@falcon030](https://forum.robotframework.org/u/falcon030)\
**Post date:** [25 June 2024 14:10 UTC](https://forum.robotframework.org/t/autocomplete-not-able-to-select-the-selector-for-a-table-of-autocomplete-values/7479/4 "2024-06-25T14:10:11Z")

</div>

And what happens if you someting like:

Fill Text &nbsp; input[name=“$PpyWorkPage$pProjectDetails$pCounterParts$l2$pUserIdentifier”] \>\> visible=‘true’&nbsp;&nbsp;HI

---

<div class="post-metadata">

**Author:** ![SteL](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@SteL](https://forum.robotframework.org/u/SteL)\
**Post date:** [26 June 2024 05:43 UTC](https://forum.robotframework.org/t/autocomplete-not-able-to-select-the-selector-for-a-table-of-autocomplete-values/7479/5 "2024-06-26T05:43:50Z")

</div>

I got this issue:

Error: locator.fill: DOMException: Failed to execute ‘querySelectorAll’ on ‘Document’: ‘input[name=“$PpyWorkPage$pProjectDetails$pCounterParts$l2$pUserIdentifier”]’ is not a valid selector.  
at query (:3329:41)  
at :3339:7  
at SelectorEvaluatorImpl.\_cached (:3116:20)  
at SelectorEvaluatorImpl.\_queryCSS (:3326:17)  
at SelectorEvaluatorImpl.\_querySimple (:3206:19)  
at :3154:29  
at SelectorEvaluatorImpl.\_cached (:3116:20)  
at SelectorEvaluatorImpl.query (:3147:19)  
at Object.query (:3361:44)  
at :3319:21  
Call log:

- waiting for locator(‘input[name=“$PpyWorkPage$pProjectDetails$pCounterParts$l2$pUserIdentifier”]’).locator(‘visible=‘true’’)

---

<div class="post-metadata">

**Author:** ![SteL](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@SteL](https://forum.robotframework.org/u/SteL)\
**Post date:** [26 June 2024 05:59 UTC](https://forum.robotframework.org/t/autocomplete-not-able-to-select-the-selector-for-a-table-of-autocomplete-values/7479/6 "2024-06-26T05:59:16Z")

</div>

I got but I dont know why. I have used the Robocorp plugin to record my steps and the solution was this at the end:

```
Fill Text xpath=(//input)[75] Mustermann TestMax

```

I am a little bit confused but it works 😃

---

<div class="post-metadata">

**Author:** ![falcon030](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/falcon030/32/3420_2.png) [@falcon030](https://forum.robotframework.org/u/falcon030)\
**Post date:** [26 June 2024 09:52 UTC](https://forum.robotframework.org/t/autocomplete-not-able-to-select-the-selector-for-a-table-of-autocomplete-values/7479/7 "2024-06-26T09:52:58Z")

</div>

When you copy paste the code, you have to replace the double quotes by real double quotes and you have to make sure there are at least 2 spaces between the arguments.

---

<div class="post-metadata">

**Author:** ![falcon030](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/falcon030/32/3420_2.png) [@falcon030](https://forum.robotframework.org/u/falcon030)\
**Post date:** [26 June 2024 09:56 UTC](https://forum.robotframework.org/t/autocomplete-not-able-to-select-the-selector-for-a-table-of-autocomplete-values/7479/8 "2024-06-26T09:56:50Z")

</div>

Your code may work, but it’s a little brittle because you’re selecting input element number 75. If the HTML of the page changes, then there is a big change that you select the wrong element.

---

<div class="post-metadata">

**Author:** ![SteL](https://avatars.discourse-cdn.com/v4/letter/s/9fc29f/32.png) [@SteL](https://forum.robotframework.org/u/SteL)\
**Post date:** [28 June 2024 09:34 UTC](https://forum.robotframework.org/t/autocomplete-not-able-to-select-the-selector-for-a-table-of-autocomplete-values/7479/9 "2024-06-28T09:34:42Z")

</div>

I checked it again and now your first suggestion works. I don’t know what was wrong. I have reinstalled robot framework and the browser library and now it is working. Thank you @falcon030

---

<div class="post-metadata">

**Author:** ![Richiee](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/richiee/32/3971_2.png) [@Richiee](https://forum.robotframework.org/u/Richiee)\
**Post date:** [17 July 2024 07:22 UTC](https://forum.robotframework.org/t/autocomplete-not-able-to-select-the-selector-for-a-table-of-autocomplete-values/7479/10 "2024-07-17T07:22:58Z")

</div>

Thanks mate for sharing these insights mate as I found it very much useful and informative to be honest also as a new member I am loving this community so far and looking forward for more such discussions.
