When click on the link on the current web page open the browser and that too in another tab - how we can do in testcomplete ?
If the new page is a different URL, then no problem. It would be mapped as a different page object in TestComplete and operated against appropriately.
Thanks for the updates
Yes New page is different URL. I have mapped it . But When We click on the link on the current page then how can I ask testcomplete to click on the new page in another tab ?
Just like we do right click and then select "Open link in New Tab" manually.
How can we ask testcomplete to do this ?
Question: What is the test purpose of this? I would expect that, if this is an application requirement to open a new tab on clicking the link, a standard "click" would do what you want.
I mean, you can do it. You would have to use the ClickR method to perform the right click. Clicking on the context menu is a bit different and tricky. I don't like having to work with context menus unless I explicitly have to. I tried it in Chrome and it's not pretty.
So, if THAT's what you want to do, here's what I would suggest.
1) Grab the URL from the appropriate property on the link you want to click and store it in a variable
2) Use the keystrokes your browsewr has for opening a new tab. Basically, I sent a Keys("^t") to my page to open the new tab
3) Use the "ToURL" method on your browser to navigate to the URL captured in step 1.
This will open up the new tab and navigate to the appropriate URL in that new tab. Then, if the pages are mapped properly, TestComplete will operate on the appropriate tabs based upon the page that is used.
I need to check whether link navigate to another application page from the current page. So when click on the link it open up another application on top of the current page. I do not have the way to go back to same page from where I clicked on the link except using back button of the browser which I do not want to use.
Does your app not have a Back or Return or some other button that the user would click to go back to the first browser? If the user has to use the back button on the browser, then that's what you should do too.
No the app do not have back button.
In the mean time I am trying to follw the solution mentioned by @tristaanogre
I am not sure how the users are using those applications. we do not expect to use back browser button.
If your purpose is to make sure that the link takes you to the correct page, you may not need to navigate to it. There is a property on a link that contains the URL of the target page. You could simply set up a property checkpoint to check that value.
Thanks for the updates
I am seeing the property
namePropStr - showing the URL without the https
then we have also browser specific property like
So suppose if clicking on the link give 404 error then how will this take care without navigating ?