cancel
Showing results for 
Search instead for 
Did you mean: 

opening url in new browser window

Contributor

opening url in new browser window

Hi one of my team requirement is open an application in new browser window. if have the below 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 and tried didnot help. 

 

https://community.smartbear.com/t5/TestComplete-Functional-Web/Open-a-new-browser-window-function/m-...

https://community.smartbear.com/t5/TestComplete-Functional-Web/Opening-second-browser-window/m-p/122...

 

 

4 REPLIES 4
Community Hero

Re: opening url in new browser window

Did you try what @tristaanogre suggested when you asked the same question over in this thread?  If so, what happened?

https://community.smartbear.com/t5/TestComplete-General-Discussions/Chrome-browser-navigating-to-quo...

Highlighted
Community Hero

Re: opening url in new browser window

Question:  Is this a requirement of the application, that you need to be able to open a second browser window and perform some actions against it?  Or is this a requirement of the written manual test that you're converting to automation? 

 

While technically speaking, automated tests should be able to do everything a manual test does, one of the bonuses of having a well written, coded, robust automated test is that you don't HAVE to do what is manually written.  The question I would have of the manual test is "Why do we need a second browser window?  What is the functionality that we're trying to test?"  The answers to that may dictate that, while manually this seems to make sense, for an automated test, it might be sufficient to simply close the browser and reopen it to a new URL.  

So... what's the purpose of the second browser window?  What are you trying to achieve?  Perhaps there's another way of doing which, in the meantime, may work better than other suggestions.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Community Manager

Re: opening url in new browser window

Hi @techgirlbb,

 

Was the issue resolved? Please let us know if you need any more assistance.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Occasional Contributor

Re: opening url in new browser window

Hi,

 

I tried this piece of code in python, Where i am able to open a new browser window, when one instance of the browser is already present.

 

You can convert this piece of code to your desired language and try it out.

 

import os

os.system("start chrome https://www.google.com/ --new-window")