cancel
Showing results for 
Search instead for 
Did you mean: 

How to add browser as a tested application

SOLVED
Highlighted
Occasional Contributor

How to add browser as a tested application

Hello

 

Im trying to add browser as a tested application and could not find any significant information on the discussions board.

 

Can you please help me with a way to add a browser based web application as tested application?

 

My Requirements:

1. I want to be able to launch the web browser based web application

2. Parameterize it against different environments, test, stage

3. The main reason why i started looked for tested application is I want the Test Complete to ignore the currently running IE browser and open a new Browser window and execute the tests and Close it upon completion. In my code i get the current page url and use the url to navigate to others pages. So i to be able to open a individual browser session and run my tests successfully

 

Please let me know if I can provide more information 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: How to add browser as a tested application

7 REPLIES 7
Highlighted
Community Hero

Re: How to add browser as a tested application

1)  Best practice is to not have any extra browser windows or other applications open when you run a test.

 

2) Here's how you open a URL in a new browser

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

 

3) The Close method for a browser is in here

https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/web/general/browser/...

Highlighted
Occasional Contributor

Re: How to add browser as a tested application

Thanks @Marsha_R 

 

Totally agree. the best practice is to close existing browser applications before i launch the tests and I have implemented it the very same way of writing an if condition to check if an browser exists and close it if it does. But sometimes if there is any browser warning then it could not Click on "Leave Page" and quit the browser.

So i have added conditional statements to check if those objects exists and Click on Leave Page in case they exists . But this is taking for ever. My sign in test almost took 2 minutes .

So as a solution for that I have thought of using Tested applications and opening the application in a new browser window.

 

My question now is : Is there a way to Force Close the IE browser regardless of browser warnings and pop ups??

 

Highlighted
Community Hero

Re: How to add browser as a tested application

You can close the browser process instead of trying to close the window itself

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

 

Another thought is that sometimes in our quest for automated tests we try for "perfect" when "good" will do and not take nearly as much time.  I just make it part of the process to close everything on the test machine manually before I start the test.  

Highlighted
Occasional Contributor

Re: How to add browser as a tested application

Thanks again with very prompt responses. I have no luck with closing the browser process.

 

This is the error when i try that 

testbuilder_0-1604075636913.png

 

and the code i have used is 

 

testbuilder_1-1604075676677.png

 

Highlighted
Community Hero

Re: How to add browser as a tested application

Highlighted
Community Manager

Re: How to add browser as a tested application

Thanks a lot for your help Marsha!

 

@testbuilder does this solve the issue? 


Sonya Mihaljova
Community and Education Specialist

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

Re: How to add browser as a tested application

Thanks @Marsha_R that solved the issue. 

 

@sonya_m thanks for following up and the above solution solve my issue

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors