Ask a Question

Launching browser

SOLVED
djvakarjoshi1
Occasional Contributor

Launching browser

Hi,

 

I am trying to open chrome using the following code:

Browsers.Item(btchrome).Run(LoginURL);

Sys.Browser().BrowserWindow(0).Maximize();

 

But this throws exception as Error Undefined. May I know what has to be done in this.

13 REPLIES 13
AlexKaras
Community Hero

Hi,

 

Check if

Browsers.Item(btChrome).Run(LoginURL); // Capital 'C'

helps...

 

 

Regards,
  /Alex [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
================================
djvakarjoshi1
Occasional Contributor

Its Capital C only, bymistake here it is small. while opening chrome browser it enters into exception and throws error as error undefined as in attached screenshot.

TanyaYatskovska
SmartBear Alumni (Retired)

Hi @djvakarjoshi1,

In your example, you specified two lines. Which exact line fails?

Also, could you please try to record the script by using TestComplete's Recording feature and play it back? Do you see any errors?

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



It fails in the first line

AlexKaras
Community Hero

Hi,

 

Can you post the screenshot of the whole test window? (Code or Keyword)

Does LoginURL have value assigned? Does it contain valid web address?

Does the Additional Info test log panel contain some extended information?

 

Regards,
  /Alex [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
================================
tristaanogre
Esteemed Contributor

Do you have a web license?  The Browsers object is not available if you're not licensed for it.


Robert Martin
[Hall of Fame]
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
Vegas Thrill Rider
Extensions available
sonya_m
SmartBear Alumni (Retired)

Thanks everyone for participating in this thread. 

Hi @djvakarjoshi1 , were you able to solve this? If not, please provide the community members with the details they are requiring and we will try our best to help. 


Sonya Mihaljova
Community and Education Specialist

djvakarjoshi1
Occasional Contributor

I am able to launch it in internet explorer but not in chrome

Two questions:

 

1) What version of Chrome are you running?

2) What version of TestComplete are you running?

If Chrome has updated recently, you may be running a version of Chrome that needs a patch for TC.  Currently, there are patches available for Chrome 79 (the latest version) for TC 14.20 and 14.30.


Robert Martin
[Hall of Fame]
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
Vegas Thrill Rider
Extensions available
cancel
Showing results for 
Search instead for 
Did you mean: