Telerik Forums
Testing Framework Forum
8 answers
158 views
I'm trying to use the Telerik Testing Framework (Not Studio) to run tests with NUnit.
I have only just started with your testing framework so are probably asking some "newbie" questions (Sorry).

I have to use IIS as I'm using VS20103.
I have looked at your example code QuickSTarts_NUnit/AspNetANdTestRegion.
I have used this as a basis for my test.
I have a couple of questions.
1. When using your BaseTest, How do I get access to the TextFixture to start my IIS as the start of all my tests?
2. How do I shut down a browser at the end of a test? A Manager.RemoveBrowser(ActiveBrowser.ClientId) doesn't seem to do this.
3. When running TestMethod2 and TestMethod2B both browsers are left running. If I do this.CLeanup() in test MyTestCleanUp() this has no affect.

My aim is to start IIS at the beginning of the Tests, Load a page and perform some tests.
Some tests will load different pages in the same browser.
I want to test my javascript
I want to test multiple pages (Although I think I read that this wasn't possible).

I've attached my simple test project only TestMethod2 & TestMethod2B work at all.
Ivaylo
Telerik team
 answered on 21 May 2014
1 answer
61 views
I have tried both your official release (2014.1.410) and dev release(2014.1.428) and have found this issue present in both. Please note that I cannot give you our application to reproduce this.

We have a WPF application which uses Telerik WPF controls and from these, amongst others, we use the Telerik Backstage where we do our applications document open/save/new functionality. Previously in version 2013.2.1327 we were automating the open and save dialogs with no problems but since your latest release one the dialog has been handled and the save or open button clicked the backstage, which used to close afterwards, now locks and the application is unusable.

I have proved that rolling back to 2013.2.1327 has meant our application does not lock up any more so something has changed meaning we cannot upgrade.

I notice in release notes that you have done a great deal around dialog handling so maybe something has been done to break this.

Ivaylo
Telerik team
 answered on 19 May 2014
12 answers
146 views
Hello all,

I have a suite of automated tests that run fine on IE. When I change my app.config to use Chrome, all the tests fail and timeout with this exception.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TimeoutException: Timeout trying to connect to Silverlight App.

I have other non Silverlight pages in my application that execute fine. Any pointers or tips would be much appreciated.

Thanks,

Joseph

 
Cody
Telerik team
 answered on 12 May 2014
3 answers
56 views
Hello,

There's an overload for a selector element titled SelectByText(string, bool) which has its second parameter invoke an on change event. This overload is what's necessary in my code to select a single option on my software's page.

However, there appears to be no MultiSelectByText overload with a similar invoke event, and it seems an immediate call to

selector.InvokeEvent(ArtOfTest.WebAii.Core.ScriptEventType.OnChange) 

after the MultiSelectByText() is done, does not have my software respond to the selected options.

Note, the options do show as selected, implying the MultiSelectByText is setting them, and it just looks like it needs the same overload functionality to initiate the OnChangeEvent.

Any Help would be appreciated, thanks.
Boyan Boev
Telerik team
 answered on 12 May 2014
4 answers
89 views
Greetings,

When trying to run TestingFramerworkFree.2013.2.1210.exe I get a pop-up "Old Installer Version - Hmmm.  It seems this installer is a bit old.  Please, download the newst shiny version from here"

The only options are to select the Close button or select the "here" hyperlink.

Selecting the "here" link directs me to "http://www.telerik.com/download" but there is no link to update the Installer version that I can see.

Downloading the latest testing framework is not an option as my test cases will break.

Help!
Xiaoyu
Top achievements
Rank 1
 answered on 07 May 2014
1 answer
117 views
I know this may not be a direct question wrt the framework, but I wanted to check what kind of process others are using to evaluate test coverage of their app, any help will be much appreciated, thanks in advance.
Cody
Telerik team
 answered on 02 May 2014
2 answers
65 views
Run this piece of code: 

[TestFixture]
  public class TelerikTestingFrameworkTests
  {
      [Test]
      public void DownloadAFile()
      {
          var mySettings = new Settings
          {
              Web =
              {
                  DefaultBrowser = BrowserType.FireFox
              },
              ExecutionDelay = 1,
              UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle
          };
 
          var manager = new Manager(mySettings);
          manager.Start();
          manager.LaunchNewBrowser();
          manager.DialogMonitor.Start();
 
          var browser = manager.ActiveBrowser;
 
          string urlForDownload = @"http://notepad-plus-plus.org/download/v6.5.5.html";
          browser.NavigateTo(urlForDownload);
           
          HtmlAnchor a = browser.Find.ByExpression<HtmlAnchor>("TextContent=Notepad++ Installer""tagname=a");
           
          string saveLocation = System.IO.Path.Combine(@"c:\", "notepadSetup.exe");
          File.Delete(saveLocation);
 
          DownloadDialogsHandler handler = new DownloadDialogsHandler(browser, DialogButton.SAVE, saveLocation, browser.Desktop);
          a.Click();
   
          handler.WaitUntilHandled(20000);
          //System.Threading.Thread.Sleep(10000);
           
          File.Exists(saveLocation).Should().BeTrue();
 
          manager.Dispose();
          File.Delete(saveLocation);
 
      }
  }

The result is:
System.TimeoutException : Timed out waiting '20000' msec. for any dialog to be handled '1'

The file is downloaded, but WaitUntilHandled fails everytime.
If I try to remove call to WaitUntilHandled and call Sleep(20000), all goes fine. 
 
I configured Firefox as described in http://docs.telerik.com/teststudio/user-guide/configure-your-browser/firefox.aspx
but  in Firefox 29 was removed the "Show the Downloads window.. " setting.

What is wrong in my code?









Ivaylo
Telerik team
 answered on 01 May 2014
6 answers
318 views
Hi Team,

We are creating generic functions for Upload dialog box which is displayed to the user when he clicks the button e.g. Browse
  There are two problems which we are facing.

1. The button is of HTMLinputfile type and we are unable to click it, using below code.
     // myManager.ActiveBrowser.Frames[0].Find.ById<HtmlInputFile>(objID).Click();

2. Once the browse button is clicked manually the windows open dialog box is displayed.
We have kept the code in Debug mode (visual studio  c#) and Telerik app closes closes the dialog box automatically.
Again if we click the browse button the windows open dialog box is displayed, and once we start our debugging we are able to upload files successfully using the below code.
=============
            try
            {
                FileUploadDialog fileDialog = new FileUploadDialog(Manager.Current.ActiveBrowser, InputFile, DialogButton.OPEN, objID);
                Manager.Current.DialogMonitor.AddDialog(fileDialog);
                Manager.Current.DialogMonitor.Start();

                // Wait Until Dialog is Handled.
                fileDialog.WaitUntilHandled(50000);
                Manager.Current.DialogMonitor.Stop();
.............................................

Inputfile="test.jpg",
objid = Object ID or the windows dialog box header

FYI: This works fine with record and playback.

Regards
Tapan
Cody
Telerik team
 answered on 28 Apr 2014
5 answers
98 views
Hello

I'm trying to select a cell on a third party DataGrid (ComponentOne FlexGrid) and I'm having some issues.

I cant seem to cast it as a Generic DataGrid and when I use CastAs<DataGrid> the rows and columns are coming back as 0.

I can see the children and they are there but I need to know how many columns there are to work out what item to select when they specify row and column.

I guess I could possibly add a property called columnCount to the control and then get it with GetProperty(). But I don't want to do that.

Is there a clean way I can get this info out ? In general if I have a collection can I use GetProperty or something similar to get its properties or its elements.

Thanks
Cody
Telerik team
 answered on 24 Apr 2014
2 answers
102 views
Hi,

Is there a repository of old Test Framework downloads?

I am specifically looking to download version 2013.2.1417.

I have scripts that will not run with the latest framework.

Thanks
Ghi
Top achievements
Rank 1
 answered on 17 Apr 2014
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?