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

Silverlight getting timeout in Dev buy not in QA

5 Answers 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kiran
Top achievements
Rank 2
Kiran asked on 26 Jul 2010, 04:57 PM
Hi,

I am automating silverlight 3 application using webAii 2.0.
I am having a strange issue

when i use the below code in Dev source code of my application its getting timeout. But the QA version of the same works fine.

ActiveBwoser.SilverlightApplications()[0];

Anyone has any info on this.
I developed simple silverlight application and locally tested thats is working fine. But my real project is not.

Thanks
Kiran

5 Answers, 1 is accepted

Sort by
0
Missing User
answered on 26 Jul 2010, 11:17 PM
Hello Kiran,

For a coded step method, it should contain the annotation something like the following:

[CodedStep(@"Navigate to:'http://demos.telerik.com/silverlight/#GridView/FirstLook'",RequiresSilverlight=true)]
public void WebAiiTest1_CodedStep()
{
}

with the RequiresSilverlight=true being the required annotation

Kind 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
Kiran
Top achievements
Rank 2
answered on 27 Jul 2010, 07:08 AM
Hi,

I am using WebAii 2010.1 version.
I am not finding the attribute in my project.
Is it in any other dll or only in latest version of WebAii

Thanks
Kiran
0
Missing User
answered on 27 Jul 2010, 05:44 PM
Hi again Kiran,

I was alittle confused by what you mean by Dev source code vs QA version. But if you are using WebAii,
please make sure you have:

Manager.Settings.EnableSilverlight = true;

If you are using one of the WebUI templates, then setting the flag would look something like this:

#region WebAii Initialization
       // Initializes WebAii manager to be used by the test case.
       // If a WebAii configuration section exists, settings will be
       // loaded from it. Otherwise, will create a default settings
       // object with system defaults.
       //
       // Note: We are passing in a delegate to the VisualStudio
       // testContext.WriteLine() method in addition to the Visual Studio
       // TestLogs directory as our log location. This way any logging
       // done from WebAii (i.e. Manager.Log.WriteLine()) is
       // automatically logged to the VisualStudio test log and
       // the WebAii log file is placed in the same location as VS logs.
       //
       // If you do not care about unifying the log, then you can simply
       // initialize the test by calling Initialize() with no parameters;
       // that will cause the log location to be picked up from the config
       // file if it exists or will use the default system settings (C:\WebAiiLog\)
       // You can also use Initialize(LogLocation) to set a specific log
       // location for this test.
       // Pass in 'true' to recycle the browser between test methods
       //Initialize(false, this.TestContext.TestLogsDir, new TestContextWriteLine(this.TestContext.WriteLine));
       // If you need to override any other settings coming from the
       // config section you can comment the 'Initialize' line above and instead
       // use the following:
         
       // This will get a new Settings object. If a configuration
       // section exists, then settings from that section will be
       // loaded
       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));
         
       // Set the current test method. This is needed for WebAii to discover
       // its custom TestAttributes set on methods and classes.
       // This method should always exist in [TestInitialize()] method.
       SetTestMethod(this, (string)TestContext.Properties["TestName"]);
       #endregion
       //
       // Place any additional initialization here
       //

Also, increase the Settings.Current.SilverlightConnectTimeout if need be and if it's a localhost url, try using a '.' operator in the navigate to as in:
ActiveBrowser.NavigateTo("localhost.:")

And try clearing the browser cache if necessary.

Kind regards,
Nelson
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
Kiran
Top achievements
Rank 2
answered on 27 Jul 2010, 06:24 PM
Hi Nelson,

I am develping a silverlight application with prism with modularity. When i run this application locally i am getting timeout.
The same application deployed in IIS working fine.

Thanks
Kiran
0
Missing User
answered on 29 Jul 2010, 10:52 PM
Hello again Kiran,

I'm not too familiar with Prism, but from what I can tell in general, it sounds like it is an best practice architecture for SL apps. Are you using it for any out of browser SL applications?

Other that, you can check out the attached SL connection document, and maybe the point #5 since you said it works in IIS manager.

Regards,
Nelson
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
Tags
General Discussions
Asked by
Kiran
Top achievements
Rank 2
Answers by
Missing User
Kiran
Top achievements
Rank 2
Share this question
or