Telerik Forums
Testing Framework Forum
1 answer
68 views
I'm trying to verify images in a web app, and I notice that HtmlImage.Capture does a screen grab. If the image, once I scroll it into view, is partially obsured by a floating header we have, then the Capture() call will return part of that header.

Is there a better way to grab the image? Also, we'd like to run this on a build server too, where there is not necessarily an interactive user.

Do I need to download the image directly using the value in the SRC tag?


Anthony
Telerik team
 answered on 30 Apr 2012
3 answers
98 views

Manager.SetNewBrowserTracking(
true);
Find.ById<HtmlAnchor>("OfferDescription_code").MouseClick();
Manager.WaitForNewBrowserConnect(AD_SITE, true, 9999);
Manager.ActiveBrowser.WaitUntilReady();
Assert.IsTrue(Manager.Browsers.Count == 2);


This Assert always fails because the original window is ALWAYS closed after the popup launches on the MouseClick() call.

I've tried in both IE and Firefox.  Any ideas?
Plamen
Telerik team
 answered on 27 Apr 2012
2 answers
161 views
Hi.

I have an test method:
[TestMethod]
[DataSource("")]
public void TestMeth()
{
try
{
//do something
}
catch(Exception ex)
{
Assert.Fail(ex.ToString());
}
}

The problem is: How I can to run this test again (max 3 times) when I get the exception? 

Is in telerik testing framework something to restart the test?





Andrei
Top achievements
Rank 2
 answered on 26 Apr 2012
2 answers
155 views
Hi

Where can i find release notes for the latest telerik test framework release??

When i go to the download page and click release notes a page with one line of text appears stating something along the lines of "R1 2012"
Konstantin Petkov
Telerik team
 answered on 18 Apr 2012
4 answers
176 views
Hi,

I have just installed the latest version of Test Studio Express (2012.1.411.0) and Safari (5.1.5). When we try to run a test via Qucik Execute Safari will launch and run through the test as expected. But when we generate the code and try to run the test via NUnit we get the following exception:

System.IO.FileNotFoundException : Safari executable path not found in registry
at ArtOfTest.WebAii.BrowserSpecialized.Safari.SafariActions.LaunchNewBrowserInstanceInt(Int32 timeout, String remotedUrl, ProcessWindowStyle windowStyle, Manager manager)
at ArtOfTest.WebAii.BrowserSpecialized.Safari.SafariActions.LaunchNewBrowserInstance(Int32 timeout, String remotedUrl, ProcessWindowStyle windowStyle, Manager manager)
at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle)
at Cecil.SharePoint.Foundation.UITests.CanCreateCourseForStaffUnitTest.CanCreateCourseForStaff(BrowserType browser) in CanCreateCourseForStaffUnitTest.cs: line 78 

I've had a look through the forum, but I can't find anything on this. Do you know what registry key we need to set?


Craig
Anthony
Telerik team
 answered on 17 Apr 2012
8 answers
680 views
Hi Telerik team,

The scneario is like this : 
- In the main window of the application I am opening a pop window 
- Clicking on link button in pop up window 
- The pop up window gives an alert dialog with OK button
- Clicking on OK buttton in the Alert dialog which closes the Alert dialog 

Expected result: Alert dialog will be closed.
Actually result: Alert dialog is not handled.

Following is my code implementation. Please help to clarify.
sorry, I cannot find a public site to demo this scenario.
You can replace the URL with your local html.

Settings settings = new Settings();
settings.Web.DefaultBrowser = ArtOfTest.WebAii.Core.BrowserType.FireFox;
settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
 
Manager manager = new Manager(settings);
manager.Start();
 
manager.LaunchNewBrowser();
manager.DialogMonitor.Start();
 
// Setup dialog monitoring.
AlertDialog alertDialog = AlertDialog.CreateAlertDialog(manager.ActiveBrowser, DialogButton.OK);
manager.DialogMonitor.AddDialog(alertDialog);
 
// Set new browser tracking to enabled.
// This will make all new browser instances connect to the Manager.
manager.SetNewBrowserTracking(true);
 
manager.ActiveBrowser.NavigateTo("http://localhost:60444/ConduitGenericWebSite/Default.aspx");
 
Element confButton = manager.ActiveBrowser.Find.ById("lnkShowPopup");
(new HtmlControl(confButton)).Click();
 
// Wait for the new browser instance to connect.
manager.WaitForNewBrowserConnect("http://localhost:60444/ConduitGenericWebSite/ChildPage.aspx", true, 10000);
 
// disable new browser tracking
manager.SetNewBrowserTracking(false);
 
// Click to invoke AlertDialog.
Element confButton1 = manager.ActiveBrowser.Find.ById("lnkShowConfirmAndAlert");
(new HtmlControl(confButton1)).Click(true);
 
alertDialog.WaitUntilHandled(3000);

Regards,
Jeffery
Jeffery
Top achievements
Rank 1
 answered on 17 Apr 2012
9 answers
159 views
Hello,

I have a component that attaches to the onblur handler of a textbox.  The issue with this is that it doesn't want to attach; I have a math calculator component (an AJAX extender) that sums up the textbox values, and unfortunately its not doing the summation.  Do I have to setup something else for this?

Thanks.
Cody
Telerik team
 answered on 13 Apr 2012
1 answer
134 views
In some test cases I'm seeing RefreshDom failing (returning false).  This is seen with IE, other browsers haven't been tried.

Any pointers on what could cause this method to fail?
Plamen
Telerik team
 answered on 09 Apr 2012
1 answer
89 views
Hi.

I have a RadSlider control with minimum and maximum values.

How I can to change this values from UnitTest ?

part of code:

var severityHeaderComboBox = app.VisualTree.Find.ByName<RadComboBox>("HeaderComboBox");
Assert.IsNotNull(severityHeaderComboBox);
severityHeaderComboBox.User.Click();
RadSlider severitySlider = severityHeaderComboBox.Find.ByName<RadSlider>("severitySlider");
severitySlider.Refresh();

//try to change min value
severitySlider.DragToTick(ThumbName.StartThumb, 2);


Error message:
Assert.Fail failed. ArtOfTest.Common.Exceptions.FindElementException: Element Not found!
Stoich
Telerik team
 answered on 06 Apr 2012
3 answers
153 views
Hi

Is it possible to see how long a timeout took before it failed?

Currently when a telerik method fail on timeout the only info i get is "Wait condition timeout" or something along those lines, i would really like to have outputted how long the timeout took.

E.g.
Wait condition timeout after XX seconds


is that possible??

If it's not could you add it as a request for improvement :)
Cody
Telerik team
 answered on 05 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?