Ask a Question

How to add browser as a tested application

SOLVED
testbuilder
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 

 

7 REPLIES 7
Marsha_R
Community Hero

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/...


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

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??

 

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.  


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

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

 

Here's a previous thread that might help you with that

https://community.smartbear.com/t5/TestComplete-Functional-Web/TestComplete-does-not-appear-to-close...


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
sonya_m
SmartBear Alumni (Retired)

Thanks a lot for your help Marsha!

 

@testbuilder does this solve the issue? 


Sonya Mihaljova
Community and Education Specialist

Thanks @Marsha_R that solved the issue. 

 

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

cancel
Showing results for 
Search instead for 
Did you mean: