# Elements are not found in many cases

**URL:** <https://forum.robotframework.org/t/elements-are-not-found-in-many-cases/8891>\
**Category:** Robot Framework\
**Created:** [22 May 2025 13:18 UTC](https://forum.robotframework.org/t/elements-are-not-found-in-many-cases/8891 "2025-05-22T13:18:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![FADeGooijer](https://avatars.discourse-cdn.com/v4/letter/f/9fc348/32.png) [@FADeGooijer](https://forum.robotframework.org/u/FADeGooijer)\
**Post date:** [22 May 2025 13:18 UTC](https://forum.robotframework.org/t/elements-are-not-found-in-many-cases/8891/1 "2025-05-22T13:18:12Z")

</div>

I have several cases where Robot Framework informs me that a specific element can not be found.

In this case the id=searchWidget-input (I have also tried the full xpath, but this does not change anything).

The XML starts with a Javascript must be enabled in order to view the Top time travel app.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/e/e217862ced115d642d77eb6e21eb6f54e193ba3c.png)

Everything below this, i.e. in the div id=”root”, is not ‘available’ for Robot Frameworks.  
In some situations, this is solvable to use Select Frame to make the elements visible for Robot Framework. In other cases (like this one) does not have (i)frames however. Does anyone have an idea how to get around this?

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [22 May 2025 13:55 UTC](https://forum.robotframework.org/t/elements-are-not-found-in-many-cases/8891/2 "2025-05-22T13:55:16Z")

</div>

There are 2 web testing libraries for robot framework, you didnt specify which one you are using nor did you share any code that could give hints..

with all of this, i’d say “Its in shadow root and fixing the issue depends on which library you are using”.

---

<div class="post-metadata">

**Author:** ![FADeGooijer](https://avatars.discourse-cdn.com/v4/letter/f/9fc348/32.png) [@FADeGooijer](https://forum.robotframework.org/u/FADeGooijer)\
**Post date:** [23 May 2025 05:52 UTC](https://forum.robotframework.org/t/elements-are-not-found-in-many-cases/8891/3 "2025-05-23T05:52:07Z")

</div>

I’m only using Selenium Library and I did specify that in the commands (SeleniumLibrary.Click Element, etc.). The XML starts with this:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/e/e217862ced115d642d77eb6e21eb6f54e193ba3c.png)

---

<div class="post-metadata">

**Author:** ![FADeGooijer](https://avatars.discourse-cdn.com/v4/letter/f/9fc348/32.png) [@FADeGooijer](https://forum.robotframework.org/u/FADeGooijer)\
**Post date:** [23 May 2025 05:54 UTC](https://forum.robotframework.org/t/elements-are-not-found-in-many-cases/8891/4 "2025-05-23T05:54:32Z")

</div>

The code is this:  
SeleniumLibrary.Open Browser ${URL} ${BROWSER}  
SeleniumLibrary.Maximize Browser Window  
SeleniumLibrary.Wait Until Page Contains Element id=ggcSearchInput  
SeleniumLibrary.Input Text id=ggcSearchInput 3825EE  
SeleniumLibrary.Wait Until Page Contains Element id=ggcSuggestionList-9  
SeleniumLibrary.Click Element id=ggcSuggestionList-9  
SeleniumLibrary.Wait Until Page Contains Beschikbaar voor dit adres  
SeleniumLibrary.Wait Until Page Contains Meest bekeken en besteld  
SeleniumLibrary.Scroll Element Into View id=card\_heading\_product-riV7E6GW8OG6Topotijdreis.nl  
SeleniumLibrary. Click Element id=card\_heading\_product-riV7E6GW8OG6Topotijdreis.nl  
.

```
SeleniumLibrary.Click Element id=searchWidget-input
SeleniumLibrary.Input Text id=searchWidget-input Amersfoort
SeleniumLibrary.Click Element id=searchWidget-suggestion-item-0
SeleniumLibrary.Click Element xpath=//*[@id="root"]/div/div[2]/div[1]/button

```

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/7/7cc2d2153baa7b4dfe5fb6a5418d3ace4c371afe.png)

It fails at line SeleniumLibrary.Wait Until Page Contains id=searchWidget-input.

---

<div class="post-metadata">

**Author:** ![CharlieScene](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/charliescene/32/3484_2.png) [@CharlieScene](https://forum.robotframework.org/u/CharlieScene)\
**Post date:** [23 May 2025 06:18 UTC](https://forum.robotframework.org/t/elements-are-not-found-in-many-cases/8891/5 "2025-05-23T06:18:31Z")

</div>

Hi,

First if you’re using only Seleniumlibrary, you could remove it in front of each kwd call to enhance readability.

Then for your issue you’re waiting that the page contains text “id=searchWidget-input”, which might never happen.

You should use _Wait Until Page Contains Element_ or _Wait Until Element Is Visible_ with you id=… locator

Regards  
Charlie
