This is a migrated thread and some comments may be shown as answers.

Not able to connect with a already open Browser

9 Answers 124 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kuldeep
Top achievements
Rank 1
Kuldeep asked on 21 Feb 2014, 10:39 AM
Telerik Test studio is not able to identify controls from already opened browser window. i've tried it with the connect browser option but it is giving exception. please find attached snap shot of exception for additional details.

9 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 26 Feb 2014, 09:54 AM
Hello Kuldeep,

Please note that attaching the recorder to already opened browser is only possible when you use IE only.
If you are trying to connect to different browser that IE this is expected version. 
If you are using IE please check this article for more information. Since you are using Visual Studio the most common reason for this is if you are not running Visual Studio as administrator. Please also make sure you check the other options described in the article.

Regards,
Ivaylo
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Kuldeep
Top achievements
Rank 1
answered on 26 Feb 2014, 10:13 AM
Thanks Ivaylo.

Mentioned article shows the issue regarding Launching Recorder to existing browser. but my question is identify controls via code in an already opened browser.

i.e.

manager.WaitForNewBrowserConnect("http://demos.kendoui.com/web/grid/editing-custom.html", true, 3000);

let me know if additional details required in this matter.

Thanks
Kuldeep Vasani.
0
Ivaylo
Telerik team
answered on 03 Mar 2014, 08:20 AM
Hello Kuldeep,

You cannot proceed and attach to already opened browser as you demonstrated. Are you opening the browser via code or you are opening it manually. Please provide a sample test for more clarity on what you are trying to achieve.

Looking forward to hearing from you.

Regards,
Ivaylo
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Kuldeep
Top achievements
Rank 1
answered on 03 Mar 2014, 09:15 AM
We are trying to access browser opened by Coded UI test. Please find below snapshot of coded for your reference.

            BrowserWindow Browser = new BrowserWindow();
            Browser.NavigateToUrl(new Uri("http:\\www.xyz.com"));
            /*
             * Some Coded UI Steps 
             */

manager.WaitForNewBrowserConnect("http://demos.kendoui.com/web/grid/editing-custom.html", true, 3000);

let me know if additional details required in this matter.

Thanks
Kuldeep Vasani.
0
Ivaylo
Telerik team
answered on 05 Mar 2014, 09:51 AM
Hello Kuldeep,

Please try using the following code:

// Initialize the settings
Settings mySettings = new Settings();
  
// Set the default browser
mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer;
  
// Create the manager object
Manager myManager = new Manager(mySettings);
  
// Start the manager
myManager.Start();
  
// Launch a new browser instance. [This will launch an IE instance given the setting above]
myManager.LaunchNewBrowser();
  
// Navigate to a certain web page
myManager.ActiveBrowser.NavigateTo("http://www.google.com");


Regards,
Ivaylo
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Kuldeep
Top achievements
Rank 1
answered on 05 Mar 2014, 09:55 AM
This will open a browser fro Telerik Test Studio test and Navigate to Google.com.

but my question is to connect to browser which Is already open.

I am not able to achieve it with this piece of code.

Thanks
Kuldeep Vasani
0
Madhu
Top achievements
Rank 1
answered on 06 Mar 2014, 07:27 PM
Hi Kuldeep,

I'm also interested in your post, you're trying to execute tests on already opened browser? or
trying to record further steps on already opened browser?

I hope 1st one is not possible with telerik test studio but 2nd option you could.

Thanks,
Madhu
0
Kuldeep
Top achievements
Rank 1
answered on 07 Mar 2014, 04:14 AM
Yes Madhu, we are trying to execute tests on already opened browser.

I have referred some of the Telerik forum entries which says it is a limitation of Telerik and they are working on it. entries were more that 18 months old. so I was wondering weather they have added support of it is still missing from Telerik.


Thanks
Kuldeep
0
Tim
Top achievements
Rank 1
answered on 25 Mar 2016, 02:57 PM
I'm also interested as to whether there's a resolution for your issue.
Tags
General Discussions
Asked by
Kuldeep
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Kuldeep
Top achievements
Rank 1
Madhu
Top achievements
Rank 1
Tim
Top achievements
Rank 1
Share this question
or