cancel
Showing results for 
Search instead for 
Did you mean: 

How to open a link in a new tab

SOLVED
Highlighted
Frequent Contributor

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?

Capture.JPG

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Contributor

Re: How to open a link in a new tab

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.

View solution in original post

1 REPLY 1
Highlighted
Frequent Contributor

Re: How to open a link in a new tab

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.

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors