cancel
Showing results for 
Search instead for 
Did you mean: 

How to launch web browser from python script

Occasional Contributor

How to launch web browser from python script

Hi Guys

I want to launch a web-browser from python script test with a particular URL and then perform the authentication with username and password. Can anyone help to execute this task?

 

I tried using Browsers.Item[btChrome].Run() but encountered with an error saying that "unable to use browser object. The web testing plugin that implements the object code is not installed."

5 REPLIES 5
Community Hero

Re: Hot to launch web browser from python script

Do you have web module licensed?


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

Occasional Contributor

Re: Hot to launch web browser from python script

No. I have only desktop testing licenced 

Community Hero

Re: Hot to launch web browser from python script

Then you can not use Browsers method to trigger browser.

refer: https://support.smartbear.com/testcomplete/docs/app-testing/web/general/requirements.html#Edition


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

Occasional Contributor

Re: How to launch web browser from python script

any other solution to use this?

or any other way in python scripting to launch the browser and authenticate the screen?

 

import webbrowser

import requests

webbrowser.open_new(url)

response = requests.get(url, auth=(username, password))

 

Here, I am able to open the web browser but unable to authenticate the browser popup screen.

Community Hero

Re: How to launch web browser from python script

In order to test Web applications and verify/validate components and such within Web applications, you need the Web license.  TestComplete requires such in order to identify the components.  TestComplete is NOT a generic Python IDE so, while you can import modules and such, the identification of on screen objects still requires the use of TestComplete's engines which requires the proper license to be able to work.

Please contact your sales representative or customer success manager for information on obtaining the proper license.


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
New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors