How can I open new browser session by test complete
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I open new browser session by test complete
I need to work on multiple urls in my project with different browser instances. When I use Browsers.Item(btIExplorer).Run(url1), It is entering url with existing browser.
When I try WshShell.Run("iexplore.exe " +url2), IE is getting hang every now and then. It is not working always
When I try Sys.Browser('iexplore').BrowserWindow(0).Keys("^t"), it is opening new tab, but still url is entering in the previous tab.
Question 1: Is there any direct method in Testcomplete to launch new browser instance (in IE & Chrome)
Question 2: If no, how can I identify the last opened browser and enter my application URL to that browser.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@fayizkc wrote:
Question 1: Is there any direct method in Testcomplete to launch new browser instance (in IE & Chrome)
AFAIK, There is no direct way to ignore the current instance of chrome/ie and open a new browser instance.
@fayizkc wrote:
Question 2: If no, how can I identify the last opened browser and enter my application URL to that browser.
Check using Sys.Process("browser").Exists. If exists then use that browser instance to do so.
Thanks
Shankar R
LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com
“You must expect great things from you, before you can do them”- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shankar,
As I want to work with multiple URLs at same time, Sys.Process("browser").Exists will be true if I need to open new browser instance. My requirement is, need to open a new url as a separate instance to validate something in between the execution of my primary url without closing it. What solution we have in Test complete
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to launch a new browser instance then you can use WshShell like below
WshShell.Run("powershell -command start chrome ");
to activate the chrome, loop thru the browser instances.
Thanks
Shankar R
LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com
“You must expect great things from you, before you can do them”- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I already used WshShell.Run("iexplore.exe " +url2) as I mentioned in the question. But browser is getting hang every now and then when I use that method
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As you mentioned - When I try Sys.Browser('iexplore').BrowserWindow(0).Keys("^t"), it is opening new tab, but still url is entering in the previous tab. - Focus will be on to the previous tab. When a new tab is created using Keys Method, You have to click on the Edit Bar of the browser for the new tab and then enter the URL.
Later you can use Keys method to navigate between tabs.
