Link click is not working

Hello,

I am migrating from iMacros and there is a simple script that I am unable to get working.

I need to script the login action on a website and, after that, clicking on some link inside a div. The div is initially hidden in the page, and the body content of the div is injected after the login action.

This is how the div looks like

I need to simulate the click on that link.
The script action is this one

    {
      "Command": "click",
      "Target": "linkText=utente dott. generico",
      "Value": "",
      "Targets": [
        "linkText=utente dott. generico",
        "xpath=//*[@id=\"tblElencoAziende\"]/tbody/tr[2]/td/a",
        "xpath=//tr[2]/td/a",
        "css=#tblElencoAziende > tbody > tr:nth-child(2) > td:nth-child(1) > a"
      ],
      "Description": ""
    },

The IMacros equivalent actions is this one

TAG POS=1 TYPE=A ATTR=TXT:utente<SP>dott.<SP>generico

The HTML of that portion of the page is this one

<table class="table" id="tblElencoAziende" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td><a href="javascript:DoLoginStep3('1133644', 0);">st. leg. generico</a></td><td><nobr>00708311204</nobr></td></tr><tr><td><a href="javascript:DoLoginStep3('1000603', 0);">utente dott. generico</a></td><td><nobr>TNTGRC01A01D205D</nobr></td></tr></tbody></table>

The IMacros action works correctly, while the UI.Vision does nothing. There are no errors in the log event, so it seems the “click” is emitted, but the href action is not executed.

Do you have any tips?

Thank you!

If you can share the website link (= a test macro) we can debug this further.

As a quick workaround, replacing the CLICK with an XCLICK should work.

Thank you for your reply.

Replacing click with xclick worked (after installing the RealUser Xmodule).
Unfortunately I can’t share a website link to reproduce the error because it happens during a login process and I can’t share login credentials.

As an additional information, I was able to make the macro working with the “click” version adding explicitly two excutescript commands with the javascript that is executed when you click those links.

(this is the html of the first link)

{7BDDA2BD-8649-477F-B6F4-D6B76ACCA978}

Obviously this is not an ideal solution because every time that javascript change I have to update the Macro.

I have to check if there is a way to make you reproduce the error without the need to provide sensitive information.

Thanks,
Claudio

1 Like