# Comments for Get Element

**URL:** <https://forum.robotframework.org/t/comments-for-get-element/4269>\
**Category:** Browser-Dev\
**Created:** [19 July 2022 17:56 UTC](https://forum.robotframework.org/t/comments-for-get-element/4269 "2022-07-19T17:56:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkorpela](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/mkorpela/32/33_2.png) [@mkorpela](https://forum.robotframework.org/u/mkorpela)\
**Post date:** [19 July 2022 17:56 UTC](https://forum.robotframework.org/t/comments-for-get-element/4269/1 "2022-07-19T17:56:26Z")

</div>

Topic for comments about Browser library keyword [Get Element](https://marketsquare.github.io/robotframework-browser/Browser.html#Get%20Element)

---

<div class="post-metadata">

**Author:** ![René](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/ren%C3%A9/32/7_2.png) [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Post date:** [20 July 2022 16:58 UTC](https://forum.robotframework.org/t/comments-for-get-element/4269/2 "2022-07-20T16:58:04Z")

</div>



---

<div class="post-metadata">

**Author:** ![René](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/ren%C3%A9/32/7_2.png) [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Post date:** [20 July 2022 17:07 UTC](https://forum.robotframework.org/t/comments-for-get-element/4269/3 "2022-07-20T17:07:55Z")

</div>



---

<div class="post-metadata">

**Author:** ![olegosh](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/olegosh/32/4171_2.png) [@olegosh](https://forum.robotframework.org/u/olegosh)\
**Post date:** [29 August 2024 07:41 UTC](https://forum.robotframework.org/t/comments-for-get-element/4269/4 "2024-08-29T07:41:01Z")

</div>

Hi there! I’m using RF v7.0.1 and BL v18.0.0 - pretty awesome stuff!

But I have a situation when I use **Get Element** and specify the data-testid attribute of an element to search but it can’t find it because the data-testid attribute includes a dot “.” symbol in it.

For example: `<span data-testid="some_text.some_other_text">Content</span>`

I faced an error: “Keyword ‘Get Element’ failed after retrying for 30 seconds. The last error was: Error: locator.waitFor: DOMException: Failed to execute ‘querySelectorAll’ on ‘Document’: ‘[data-testid=some\_text.some\_other\_text]’ is not a valid selector.”

(I’m using Wait Until Keyword Succeeds in addition to Get Element)

I tried to use querySelector in the browser console and it works just fine:  
`document.querySelector('[data-testid="some_text.some_other_text"]')`  
Also, by using querySelectorAll it returns a NodeList with this element successfully:  
`document.querySelectorAll('[data-testid="some_text.some_other_text"]')`

So, I had to use a workaround to find the element using Get Element with “the not strict search”:

`Get Element [data-testid*="some_other_text"]`

IDK, it might be helpful for somebody.
