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

Attempting to get SilverlightApp Results in TimeoutException

6 Answers 82 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steven Raybell
Top achievements
Rank 1
Steven Raybell asked on 15 Jul 2010, 11:18 PM
Hey all,

I'm currently experiencing an issue where when attempting to get the SilverlightApp, the automation experiences a Timeout.  I've tried changing security settings as per instructions for setting up for WebAii, I've tried running as admin, impersonation, the works.

I can access HTML elements without issue, however, when attempting to get the app, it finds the element (as reflected by debugging) for the Silverlight object, but the app reference fails return.  Increasing the timeout only results in the exception coming later and does not improve the situation.

The code here:

            this.Manager.LaunchNewBrowser(BrowserType.InternetExplorer, true, System.Diagnostics.ProcessWindowStyle.Maximized);
            this.ActiveBrowser.NavigateTo("https://ourwebsite/OurAppLocation/");

            SilverlightAppsList appsList = this.ActiveBrowser.SilverlightApps();
            SilverlightApp app = appsList[0];

results in the exception on the last line.

I've tried other .NavigateTo()+ overloads as well, without success.  Interestingly, this happens on my machine, by not my coworkers'.  Another coworker is continually having issues getting an initial action from the navigation process to work, even after modifying the security settings for IE.  We have yet to find a common problem here, other than WebAii is having a very difficult time getting the application handles, be it browser, or the SilverlightApp.

Perhaps we're missing something vital?

My machine configuration:

- Visual Studio 2010 Ultimate
- Server 2003
- IE 7
- Default Template (VSUnit)

At this rate, we've invested so much time, with little yield, we're becoming somewhat disenchanted.  Any help to get us on track ASAP would be most beneficial.  I'm trying this on another machine and will report back if the same results are observed there.

6 Answers, 1 is accepted

Sort by
0
Missing User
answered on 15 Jul 2010, 11:38 PM
Hello Steven,

Please make sure that the EnableSilverlight flag is set to true in the settings object in

MyTestInitialize() as in:

Settings settings = GetSettings();

// Override the settings you want. For example:

settings.EnableSilverlight = true;

// Now call Initialize again with your updated settings object

Initialize(settings, new TestContextWriteLine(this.TestContext.WriteLine));

Also, please check out the attached document for more options to try to connect to your Silverlight app.

The mention of the out of browser Silverlight incomparability in the document may no longer apply in the new framework version, so please ignore that for now while I confirm that it is no longer an issue.

Regards,
Nelson Sin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Steven Raybell
Top achievements
Rank 1
answered on 16 Jul 2010, 07:32 PM
Thanks!  I could have sworn I had that property set, but at least this solved my local issue.

This has lead me to a new issue, however.  We're noticing that due to the fact that we need to run with protected mode off, we have the infobar, which results in the clickable points to be shifted inappropriately from where the visible UI is.  That is to say, it's as if the automation framework is moving to where it would be if the infobar wasn't there, as opposed to moving to where the controls are really at.

I'm not sure if this is an issue with UIA/MSAA or WebAii.  Some inspection leads me to believe that WebAii is doing things in an non-typical way, which is leading to this issue.

We're also still seeing issues with browser navigation issues on some machines, regardless of settings.  In other solutions, we're still seeing timeouts, so we'll dive deeper there.

Additionally, the framework needs vast improvement in this area overall.  Fracture API stacks, non-shared API surfaces between Silverlight and HTML (which should be possible), and generally bad exceptions.  For instance, in my situation, it should have immediately thrown if EnableSilverlight was false.  Instead, it just fails to get a handle to the application.  This just blows my mind that an API would behave this way.

At this point, due to the compounding issues we're suffering through, it's possible that we'll be abandoning WebAii as our automation foundation.  The time lost investigating these issues due to poor exception information and a somewhat self-inconsistent design has been immensely frustrating for my team.

That said, I appreciate the quick response.
0
Cody
Telerik team
answered on 21 Jul 2010, 08:19 PM
Hi Steven Raybell,

I am sorry to hear you're having so much trouble. You should be able to get rid of the infobar by adding your website into the list of trusted websites. What does the infobar say when it appears?

Best wishes,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Steven Raybell
Top achievements
Rank 1
answered on 24 Jul 2010, 01:43 AM
Thanks for the response!

We've made some headway thus far, but we're still getting some inconsistent results where we're noticing that the browser yields a timeout.  We've gotten around the infobar issue (hiding it, etc.), but now, for reasons I can't yet explain, we're unable to get a handle to the browser window.  We either get a wait timeout exception (we're set to 60,000ms), or this exception:

--------------------------- ---------------------------
System.NullReferenceException: Object reference not set to an instance of an object. at ArtOfTest.WebAii.Messaging.Process.BrowserRemoteClient.Connect(BrowserType type, String version, IntPtr hwnd, Boolean isUILess, Boolean isDialog) --------------------------- OK ---------------------------

Any ideas on this one?

Oddly, this was working fine just minutes ago, but now I can't get it to grab a handle to the browser.
0
Kiran
Top achievements
Rank 2
answered on 24 Jul 2010, 09:25 AM
Hi Steven,

Can you check the below url
http://www.artoftest.com/support/webaii/topicsindex.aspx?topic=config_srvr
I dont know whether you tried this.

Thanks
Kiran
0
Steven Raybell
Top achievements
Rank 1
answered on 27 Jul 2010, 02:32 AM
I'll have my coworker give this a shot.  This however is already configured as such for my machine as I've used other frameworks with similar restrictions.

Thanks, though!
Tags
General Discussions
Asked by
Steven Raybell
Top achievements
Rank 1
Answers by
Missing User
Steven Raybell
Top achievements
Rank 1
Cody
Telerik team
Kiran
Top achievements
Rank 2
Share this question
or