Telerik Forums
Testing Framework Forum
1 answer
84 views
I hope that this is possibly a simple question.  I am using 2011_2_9_28 and just trying to execute some tests that validate the selected text in the browser.  I was unable to get it working.

Here is a basic console app that does not display text in any of the browsers that I tried.  I would just launch it and then select various things on the page including text in the search box and GetSelectedText() is always empty.  Am I using it wrong?

Manager testManager = new Manager(false);
testManager.Start();
testManager.LaunchNewBrowser(BrowserType.InternetExplorer, true);
testManager.ActiveBrowser.NavigateTo("http://google.com");

for (int i = 0; i < 20; i++)
{
	Console.WriteLine("Current: " + testManager.ActiveBrowser.GetSelectedText());
	Thread.Sleep(1000);
}

Console.ReadLine();
testManager.Dispose();
 

Anthony
Telerik team
 answered on 11 Nov 2011
1 answer
82 views
Hi,

When I run performance testing of the our web application I get results which you can see at the attachment.
At functional testing I put 500 ms execution delay twice. But performance testing says first one's total time 1250ms and second one's 1796ms. 
How can we read performance testing result? 
Anthony
Telerik team
 answered on 10 Nov 2011
3 answers
57 views
Hi Telerik,

If I am recording a new test then everything including typing to text boxes is captured by recorder. I am recording Silverlight application.

However if I replay already recorder steps by Run->To Here by mouse right click within the test then:
- steps are repeated well based on recording
- then Test Studio with small bar is attached and I am ready to record next steps
- steps are recorder OK like mouse click etc.
- no typing inside text boxes or other controls is recorded.

Nothing helps what I tried. One and only workaround is to start with empty test and then copy and paste recorded steps to old test. It is quite tricky to do it especially within big test.

Any idea? I am using 2011.2.928.0.

Best regards,
Dalibor
Anthony
Telerik team
 answered on 08 Nov 2011
3 answers
124 views
Hi Telerik,

1. I have test 1 which opens a web page and types login name and password into my Silverlight application.
2. I have test2 which calls test 1 as a first step.
3. I have test3 which calls test 2 as a firts step.
4. I have a test4 which makes 5 times loop over test 3.

When I run test1 then it works.
When I run test2 (which calls test 1) then it works.
When I run test3 (which calls test 2 which calls test 1) then it works.
But when I run test4 which calls test 3 in loop then it fails.
Test 4 does
- loop
- calls of test3
- test 3 calls test2
- test2 calls test1. This opens a browser with my Silverlight application. Then second step (typing to login text box) fails with message Timeout trying to connect Silverlight application.

Any idea? I am using 2011.2.928.0.

Best regards,
Dalibor
Plamen
Telerik team
 answered on 08 Nov 2011
1 answer
142 views
Hello, 

I'm developing a WPF desktop application
How could I create an AlertDialog and add a special handling to it.
the problem is the AlertDialog needs a Browser , but I'm working on WPF desktop app!!
any help !!
Plamen
Telerik team
 answered on 04 Nov 2011
5 answers
241 views
Hello,

Do you plan to have this documentation back, Online or Offline?
For my part, I often refer to it to learn correctly the framework.

Thanks.
Anthony
Telerik team
 answered on 03 Nov 2011
1 answer
110 views
In the web app I am testing against I've got the element:

<form name="aspnetForm" id="aspnetForm" onsubmit="javascript:return WebForm_OnSubmit();" action="default.aspx" method="post" sizcache="10" sizset="0">

The following code:

Element element1 = Find.ById("aspnetForm");
Element element2 = Find.ByXPath("//form[@id='aspnetForm']");
Element element3 = Find.ByXPath("//form[@name='aspnetForm']");

returns element1 as correct found element, wheras element2 and element3 are nulls. What is the reason for that?

IE8, WinXP.
Anthony
Telerik team
 answered on 25 Oct 2011
1 answer
100 views
HI,

I have a WPF application I want to test with Test Studio, but I'm havieng some problems to handle an Alert Dialog. In the application, i click a button to save my changes and a popup window appears to inform that changes had been saved. It contains nothing but a label and an OK button. If I execute the test from the VS plugin, it works, but when i generate code form that test these lines are created to handle the alertdialog:
// Handle 'Generic' dialog.
          GenericDialog genericDialog = new GenericDialog(ActiveBrowser, "Modeling Scenario", true, "Submit Completed Successfully");
          genericDialog.ButtonId = 2;
          Manager.DialogMonitor.AddDialog(genericDialog);

The problem is that I don't have any ActiveBrowser, Instead I do have an ActiveApplication, but GenericDialgon needs an 'ArtOfTest.WebAii.Core.Browser' variable while ActiveApplication is an 'ArtOfTest.WebAii.Wpf.WpfApplication'.
I alos tried other posibilities like AlertDialog or ConfirmDialog, but I ended with the same problem. Can you help me please? Which is the correct class i should use for a WPF message box?
Anthony
Telerik team
 answered on 25 Oct 2011
6 answers
182 views
I am attempting to automate an export scenario. our web app has a trigger that launches a second browser that triggers the download dialog. 
I have used the 3 part method of handling IE8 dialogs (saveAsDialog, IEDownloadDialog, and IEDownloadCompleteDialog) and had it working about 1/2 dozen times. And then it stopped working. I tried changing the code to use just the DownloadDialogsHandler method. Same results. 
Nothing in this area of our app has changed to make this stop working. 

What I see happening is that when the download is triggered a second IE8 browser pops, (then the download dialog is suppose to appear) however, the browser that pops is closed before the dialog gets a chance to appear. 

If someone could see where I went wrong, or has an idea as to why the thing isn't working anymore I would appreciate it.

the simpler method of using the DownloadDialogsHandler (that I've not seen work at all) was used as
DownloadDialogsHandler exportDownload = new DownloadDialogsHandler(Manager.ActiveBrowser, DialogButton.SAVE, fileSave, Desktop);
 
Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
Manager.DialogMonitor.Start();
 
HtmlControl exportSelectCSV = new HtmlControl(Find.ByAttributes("class=~SiteExportLink"));
exportSelectCSV.Click();
 
exportDownload .WaitUntilHandled();
the code I've used (and saw working a few times) is as follows 
if (File.Exists(fileSave + "export.csv"))
            
{
                File.Delete(fileSave + "export.csv");
            }
 
            SaveAsDialog saveExport = new SaveAsDialog(ActiveBrowser, DialogButton.SAVE, fileSave + "export.csv", Desktop);
            Manager.DialogMonitor.AddDialog(saveExport);
            IEDownloadDialog ieDialog = new IEDownloadDialog(ActiveBrowser, DialogButton.SAVE, Desktop);
            Manager.DialogMonitor.AddDialog(ieDialog);
            IEDownloadCompleteDialog dlComplete = new IEDownloadCompleteDialog(ActiveBrowser, DialogButton.CLOSE, Desktop);
            Manager.DialogMonitor.AddDialog(dlComplete);
             
            Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
            Manager.DialogMonitor.Start();
 
            HtmlControl exportSelectCSV = new HtmlControl(Find.ByAttributes("class=~SiteExportLink"));
            exportSelectCSV.Click();
 
            ieDialog.WaitUntilHandled();
            saveExport.WaitUntilHandled();
            dlComplete.WaitUntilHandled();
Cody
Telerik team
 answered on 19 Oct 2011
3 answers
135 views
I have a test that finds the control and clicks it to reset a filter section to default settings.
I've run this test in our pre-production environment and it works fine. When I run this in our production environment (currently the UI code is identical) it finds the control, but the click doesn't work. Nor does it error. Just seems to ignore it and continue to the assert which then fails.

the code is simple
HtmlControl filterReset = new HtmlControl(Find.ByAttributes("id=FilterActionBarReset"));
filterReset.Click();


it is used to find this element
<div class="rightAction" id="FilterActionBarReset" jQuery15206472203044463981="175">

I'm most confused by the fact that this runs in both our pre-prod (identical code) and our dev environments, but fails to click in the prod.

any ideas why this would happen?
Stoich
Telerik team
 answered on 19 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?