Forum Discussion
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.
- nisgupta5 years agoValued Contributor
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 ?
- nisgupta5 years agoValued Contributor
Just like we do right click and then select "Open link in New Tab" manually.
How can we ask testcomplete to do this ?
- tristaanogre5 years agoEsteemed Contributor
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.
2)
Related Content
Recent Discussions
- 2 days agoGane195