Forum Discussion

whuang's avatar
whuang
Regular Contributor
5 years ago
Solved

How to open a link in a new tab

Hello,

 

I have a testcase that I would like to open a link in a new tab, but because I will need to test in several different environments and the url of the link changes depending on the environments I test with, so I preher not to hardcode the url using Object.Keys("^n"), and then Object.ToUrl("URL").

 

I tried use ClickR on the link but then don't know how to select item from the right click menu. I spied the right click menu, but TC cannot read the individual menu item, it can only read the entire menu as a object as you can see in the screenshot below. I also tried keyword recording, but it doesn't record the step I clicked on the menu item, it only recorded up to I right click on the link. So is there any other way to open a link in a new tab other than hardcode the url?

Thanks!

  • Ok, nevermind, I think I figure out. Using ClickM can open a link in a new tab directly without doing any additional selection or click.

1 Reply

  • whuang's avatar
    whuang
    Regular Contributor

    Ok, nevermind, I think I figure out. Using ClickM can open a link in a new tab directly without doing any additional selection or click.