Telerik Forums
Testing Framework Forum
3 answers
95 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
153 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
145 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
172 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
642 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
151 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
124 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
87 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
140 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
1 answer
81 views
Hi team,
i met an issue about cookie today. In my web application, there is a debug page("http://wwwqa.inventory.ford.com/debug/cookies.jsp") to add a cookie with name "dealerPooling" and value "true", if i add this cookie, then a proper page will display.
My version of  telerik test studio is 2011.2.1413.0

scenario 1:
     step1: turn to "http://wwwqa.showroom.ford.com/FDShowroom.jsp?makeTransition=inventory"
     step2: click on FIESTA image
     step3: input a zipcode(48033) to zipcode input textbox and click "SEARCH DEALER INVENTORY" button
     step4: A search dealer inventory page for this scenario1 will display

scenario 2:
     turn to a debug page "http://wwwqa.inventory.ford.com/debug/cookies.jsp" and add a cookie with name "dealerPooling" and value "true"
     repeat steps in scenario2, and we can see a different search dealer inventory page for this scenario2.

What i want to know is how to add cookie with code steps?
I have tried several ways to do that, but failed, only scenario1 page displayed when i execute scenario2 step, here is some code to be invoked before clicking "SEARCH DEALER INVENTORY"

1.
Public Sub SetCookie()
            Dim newCookie As New System.Net.Cookie()
            newCookie.Name = "dealerPooling"
            newCookie.Value = "true"
            newCookie.Domain = "http://wwwqa.inventory.ford.com"
            newCookie.Expires = DateTime.MaxValue
            ActiveBrowser.Cookies.SetCookie(newCookie)

End Sub

2.
Public Sub SetCookieWithDebugPage()
            ActiveBrowser.NavigateTo("http://wwwqa.inventory.ford.com/debug/cookies.jsp")
            
            Dim nameBox, valueBox As HtmlInputText
            Dim submitButton As HtmlInputSubmit
            
            nameBox = Find.ByAttributes(of HtmlInputText)("name=newName")
            valueBox = Find.ByAttributes(of HtmlInputText)("name=newValue")
            nameBox.Text = "dealerPooling"
            valueBox.Text = "true"
            submitButton = Find.ByAttributes(of HtmlInputSubmit)("name=addCookie")
            submitButton.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop)
            submitButton.Click
End Sub
Anthony
Telerik team
 answered on 03 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?