How to Click on a search button that has no css or id selectors

Hello, I am trying to click on a search bar button. I am using python RF browser library. So far, I’ve tried Click With Options, Mouse Button, and xpath but none seems to do the trick.

Code line is preceded by:
Fill Text id=searchfor product

Then the html is like this:

button type=“submit” class=“wsp-search__btn” aria-label=“Zoeken” data-analytics-id=“px_search_button_click” data-test=“search-button”>
svg version=“1.1” viewBox=“0 0 24 24” aria-hidden=“true” class=“svg-inline–bi bi-search-vi bi-lg” data-test=“icon-search-vi” focusable=“false”>

svg version=“1.1” viewBox=“0 0 24 24” aria-hidden=“true” class=“svg-inline–bi bi-search-vi bi-lg” data-test=“icon-search-vi” focusable=“false”></svg

How does your Click Keyword look like?
What do you use as an argument for the locator?
What error message do you get?

Looking at your html, something like

Click id=px_search_button_click

should work

To try out different locators and keywords during runtime, I recommend to use VS Code as an IDE together with the RobotCode Extension and Debug your test case.
This will give you the chance to execute any Robot Framework commands while the test run is executed step by step.

Thanks, I have VScode and RobotCode active.

Because id=px_search_button_click is not the right locator, it resides within a data-test

Error: Timeout 10000ms exceeded.
Call log:

  • waiting for locator(‘id=px_search_button_click’)

ok, strange.

You can also try a text locator like

Click "Zoeken"

I guess you have already tried xpaths like

Click //button[@type='submit']


If that all does not work, you could check in the Developer Tools if the button is inside an iframe element for whatever reason. Then you can use the iframe syntax of the Browser Library using >>>

I often go into Debug mode and try out my locators using the Highlight Elements Keyword, when having problems to find elements

This xpath works. Passed!

Guess I didn’t indent it correctly before.


Hi All,
i am automating desktop application using RPA.Desktop,RPA.Windows
I am having few tabs
I selected the that tabs by using names
inside of that we have one frame and that frame have automation id
inside of that that frame we have some data like image or plots etc
When kept mouse over on the data which is inside of the frame using accessbility tool
Frame is highlighting not the element
i tried getting the data by using frameid by using get element and Get text keywors but i did not get any data.
using id:
${element} Get Element id:59648
Log ${element}
${data_text} = Get Text ${element}
Log ${data_text}
any idea on this?

HI @damies13 do you have any idea which i asked above?

Hi Surekha,

Maybe start by creating your own thread rather than responding to an old closed thread that’s not even related to your question. make sure you tag it with RPA, so the people familiar with those libraries see it and can help you

RPA.Desktop and RPA.Windows have nothing to do with Browser Library (this thread is a Browser Library thread)

Also FYI - I never used the RPA libraries.


1 Like

Sure Dave. Thank you