Ask a Question

Open url in new window

Karolina
New Member

Open url in new window

Hello.
I have a requirement to open an app in a new window.
With JavaScript code: Browsers.Item(btChrome).Run("https://google.com");

which is replacing the existing active  browser window url and lauching the application if any of browser currently open.

Else lauching the application in new browser window.

but  the requirement is :

Open an application in an new browser(Chrome) window  even if  the browser window opens.

Do we have an y TC operation for it?

 I looked at the exisitng forum posts but it did not help:
https://community.smartbear.com/t5/TestComplete-Functional-Web/Open-a-new-browser-window-function/m-p/860...

3 REPLIES 3
Marsha_R
Community Hero

You could close all open browsers (if any) before you open the URL and that would guarantee it being in a new window

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/closing-browser...


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
AlexKaras
Community Hero

Hi,

 

Alternatively to what was suggested by Marsha, you can send .Keys("^N") to browser window to open new window and then navigate to the required url using this window.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
sonya_m
SmartBear Alumni (Retired)

Thank you, Community!

 

@Karolina which advice did you choose?


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: