Telerik Forums
Testing Framework Forum
1 answer
92 views
Hello,

I'm in need of a solution for capturing an entire webpage using WEBAII/TEST STUDIO. I've seen other solutions online using third party sites and other methods. But, I'd like to keep my tool consistent, using webaii and/or test studio.

So far the only method I've found is...

Log.CaptureBrowser(ActiveBrowser);

And this doesn't suffice because it only captures what the activebrowser displays.
Boyan Boev
Telerik team
 answered on 02 Oct 2014
1 answer
89 views
Hi All,

We are using Telerik testing framework to test our Silverlight application.
Unfortunately we are unable to find a solution to access elements inside a popup.

Please see attached screen shot of Silverlight spy, which explains our situation.

Looking for a help from you guys.

Thanks in advance,
Ruwan
Ivaylo
Telerik team
 answered on 02 Oct 2014
3 answers
77 views
Hello guys
Please Help if anyone faced the same issue after latest Framework update from September 3rd

Here is the thing:
When I launch tests (which previously run OK) on IE10 it just opens Internet Explorer and waits ForBrowserToConnect but fails in a while. Browser remains open but test execution fails with following 'explanation':

SetUp : System.TimeoutException : Wait for condition has timed out
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.

   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
   at ArtOfTest.WebAii.Core.Manager.WaitForBrowserToConnect(Int32 browserIndexToWaitFor)
   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)

Boyan Boev
Telerik team
 answered on 02 Oct 2014
1 answer
121 views
I'm trying to make so that tests were run at startup AzureVM. 
But the tests are not always pass. What could be the reason? May need to specify the size of the screen?
Ivaylo
Telerik team
 answered on 02 Oct 2014
1 answer
91 views
Hi,

I am new to Coded UI and Telerik controls and having some issues with building coded UI tests on a Telerik based application. The AUT is developed using Telerik WPF (or Winforms not actually sure) and when I record the actions, each edit control is recorded under a separate window. Also, for each of the windows and edit boxes there are no search properties recorded. Though the test seems to work when I run it, it would be a maintenance issue if UIMAP does not have controls with unique properties.I have followed instructions provided in "http://www.telerik.com/help/wpf/coded-ui-support.html". 

Do I go back to the developers and ask them to define the control names or am I missing something ?
George
Telerik team
 answered on 01 Oct 2014
10 answers
139 views
Hi,

I am using Find Strategy in the manner described in http://www.telerik.com/forums/how-to-judge-whether-the-element-exists

However, in a repeated set of runs, sometimes line 175 below fails with the traceback below. Sometimes this exception occurs
in run 10, sometimes in run 6 etc.


         >         public void SanitizedFunction()
         >         {
         >
         >             FindStrategy originalStrategy = wpfClient.MainWindow.Find.Strategy;
         >             wpfClient.MainWindow.Find.Strategy = FindStrategy.WhenNotVisibleReturnNull;
         >             try
         >             {
         >                 wpfClient.MainWindow.Window.SetFocus();
         >                 wpfClient.MainWindow.RefreshVisualTrees();
line 175 >                 var dvGrid = wpfClient.MainWindow.Find.ByAutomationId("RadGridView"); // telerik control with AutomationId added
         >                 if(dvGrid!=null)
         >                 {
         >                    // real work here ...
         >                 }
         >                 else
         >                 {
         >                     Assert.IsTrue(dvGrid!=null,"dvGrid should not be null");
         >                 }
         >             }
         >             finally
         >             {
         >                wpfClient.MainWindow.Find.Strategy = originalStrategy;                
         >             }
         >         }
         >

         The traceback :
         >    at ArtOfTest.WebAii.Wpf.WpfProxy.ExecuteSLCommand(SilverlightCommand cmd)
         >    at ArtOfTest.WebAii.Wpf.WpfProxy.GetVisibility(IAutomationPeer peer)
         >    at ArtOfTest.WebAii.Silverlight.FrameworkElement.get_Visibility()
         >    at ArtOfTest.WebAii.Silverlight.FrameworkElement.get_IsVisible()
         >    at Telerik.XamlAutomation.SteelThread.TelerikSteelThread.SanitizedFunction() in TelerikSteelThread.cs: line 175
         >    at Telerik.XamlAutomation.SteelThread.TelerikSteelThread.Execute(IEnumerable`1 funcs) in TelerikSteelThread.cs: line 268
         >    at Telerik.XamlAutomation.SteelThread.TelerikSteelThread.OneRunNotamSteelThread() in TelerikSteelThread.cs: line 402
         >    at Telerik.XamlAutomation.SteelThread.TelerikSteelThread.<TestLoop>b__3(Int32 i) in TelerikSteelThread.cs: line 427
         >    at Jeppesen.MarineOperations.DotnetUtils.LinqUtils.ForEach(IEnumerable`1 enumeration, Action`1 action) in LinqUtils.cs: line 21
         >    at Telerik.XamlAutomation.SteelThread.TelerikSteelThread.TestLoop() in TelerikSteelThread.cs: line 424
         >

The traceback seems to say that FindByAutomationId fails because dvGrid is not visible, right in the Find itself, so the check
for dvGrid==null is too late, ocassionally.

Any ideas why this is so?
Cody
Telerik team
 answered on 26 Sep 2014
4 answers
318 views
Hello! 

Trying to click on a list object inside of an iFrame. No errors are thrown but the click action never seems to occur!

ArtOfTest.WebAii.Core.Browser iFrame = man.ActiveBrowser.Frames[0];

Element listBox = iFrame.Find.ById("ListBox1");
Element bradtest = TelerikHelper.FindNestedElementByLoc(listBox, ("1"));

iFrame.Actions.Click(bradtest);


Does this look correct?  TelerikHelper.findNestedElement is a helper function I wrote. It simply finds children elements and is proven to work. I checked to make sure "bradtest" is the correct element I'm attempting to click and it is. 


Boyan Boev
Telerik team
 answered on 26 Sep 2014
1 answer
138 views
I started to use Testing Framework, and  my console application runs just fine, but any other desktop or WPF have similar results:
Chrome and Firefoks stucks at "Preparing browser for automation..." message, InternetExplorer throws window saying something similar to
"Cant find module ArtOfTest.Connector.dll" and timeout later.
I am using Visual Studio 2013 run as administrator, Windows Server 2012 and reinstalled fresh version of Test Framework.
Boyan Boev
Telerik team
 answered on 23 Sep 2014
7 answers
303 views

Hi,

Environment
   - TTF: 2014.3
   - Visual Studio 2012

I am finding that I am not seeing the WindowClosed event handler getting called.
I even set things up so that I manually open and close the window; the event handler
does not seem to be fired.

I'm assuming that TTF does not require any special work to be done by the Wpf client
in order to see the event, right?

Hopefully, someone has some ideas and suggestions.

Thanks in advance,

Below is a sample code :

public class TestClass {
     private bool _winClosed;
     private void WindowClosedEventHandler(object sender, EventArgs e)
     {
         _winClosed = true;
     }
 
     public void CloseWindow()
     {
         var win = wpfClient.WaitForWindow("Header of Window", _settings.ExecuteCommandTimeout);
         win.WindowClosed += WindowClosedEventHandler; // subscribe to event
         _winClosed = false;
         win.Window.SetFocus();
 
         while(!_winClosed) // wait for event handler to set _winClosed to true
         {
             Logger.Debug("Waiting for win to close");
             Pause(500);
         }
         win.WindowClosed -= WindowClosedEventHandler; // unsubscribe to event
     }
     ...
}

Cody
Telerik team
 answered on 18 Sep 2014
10 answers
387 views
It appears that the testing framework is automating a browser that is installed on the system. For example, if I try to launch a Chrome browser, but Chrome is not installed, I get an error.

Is there an in-memory browser of any kind? I don't care if it's IE, Chrome, FireFox, or something else. I don't want to rely on a "properly" configured browser installed on the machine in order for things to work. I am also concerned about cookie sharing among concurrent browser windows (the default for IE 8 & 9).

I am aware that these issues can be addressed using specific browser configurations and registry hacks, but again, I don't really want to have to rely on browser configuration settings for things to work properly.

I'm looking for something akin to what HtmlUnit provides for the Java community, but I absolutely love the Test Studio interface for creating tests.

Thanks!
Scott
Cody
Telerik team
 answered on 17 Sep 2014
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?