Click a link by its text on run time

Hello,

Depending on the account number, we get a link to access the account.

How can we click on a link which changes on run time ?

we need HTML example
you can try:
- adress nearest stable page object and then add just tag
- compute link based on other information

please, if you need help, try to post html example of your page so we can try solve it not guess solution for you

Hi Yashwant,

You can try this solution. i had similar requirement to click on link which is dynamically generated based on transaction ID.

1. Create Object as shown in attached document.
2. Write Following code

transaction_id = Account

Approve_Transaction = WebUI.modifyObjectProperty(findTestObject(‘Transaction ID’),

'text', 'contains', transaction_id, true)

WebUI.click(Approve_Transaction)

Basically what you are doing above code is that you are generating a string in your example, it may be simple as transaction_id = Account (this is what value that your script generated and you can capture that value Account using GetText ), then modify the object property and then click on the link.

Let me know if this solution works.

Object_Screen.JPG

2 Likes

Thanks Vikas.

That helped a lot. Really appreciate it.

I`m new to this tool, sorry for the rookie mistakes.

Cheers