How do I click on a dynamic link in a textbox?

So I have a hyperlink, a dynamic hyperlink, cleverly disguised as a textbox.
The ID is dynamically generated, but it starts with the same words all the time, so I can find it suing CSS selector. input[id^=LocationDescription]

role=“textbox”
type=“text”
class=“dyn-field dyn-hyperlink _uyeluk”

The link in the textbox will open a side panel containing information that I want to access.
The link is contained in a text field, the length of which is not fixed.
It is part of a row, the colums being of equal size, the contained text can vary in size.
So I guess I want to click on the left side of the textbox so I am guaranteed to click on the contained dynamic link.
How do I do that?
A normal click only works if the text containing the link is long enough, but that is not always the case.
I also tried to adda javascript click as addon but that also does not work.
The step passes, the element is clickable, and TestProject happily clicks the element, but nothing happens.

Hi @matthijs.risselada and welcome to our community :slight_smile:

Regarding this scenario, you can use “execute javascript” addon.
All you have to do is to copy the path of the script from the devtools, and add .click(); in the end.
For example:
chrome_tVLFABu3bx
Let me know if you have managed.

Hi @alex.ivanov thank you for your reply.
Unfortunately I do not quite understand what it is that you propose and how it is different from a javascript click.
Elsewhere in the program under test I run into a similar problem and tried your way.
I have to click on the name of the customer, which is a link.

<input id=“CustTable_Name_3_0_input” readonly="" role=“textbox” type=“text” aria-invalid=“false” aria-label=“Naam” aria-required=“true” class=“dyn-field dyn-hyperlink _uyeluk” value=“Leo Testen” data-dyn-savedtooltip="Leo Testen

Klik om de koppeling te volgen" title="Leo Testen

Klik om de koppeling te volgen">

So I created an Execute Javascript step.
The Code is
document.querySelector(“input[id^=CustTable_Name]”).click()

There is no hidden a href link.
It is a textbox with a text that acts as a hyperlink.
Not the box itself, but only the text contained in the testbox.

I also tried the
Move mouse to element with offset
Click and hold
Release left mouse button

But that also does not seem to work

@matthijs.risselada
Sorry for the misunderstanding, I think the best solution for this scenario is to use the “click at coordinates” addon:

Let me know if you have managed.

@alex.ivanov
I have not yet been able to try your solution, apologies for my late reply.
I am planning to try it at a time.
I have found another way of getting to the place I want to go, and I do not know how to get the coordinates of an element on the screen.
Also I wonder if the coordinates of an element might change of screen size of resolution changes.

This topic was automatically closed after 180 days. New replies are no longer allowed.