Telerik Forums
Testing Framework Forum
11 answers
269 views
Hi,

Is there an offline installer for the Telerik Testing Framework 2013?  I downloaded the regular install kit (TestingFrameworkFree.2013.2.1327), but it is trying to download additional files during the install which is failing (perhaps due to poor internet connection).

Thanks,
Steve
Elena
Telerik team
 answered on 25 Oct 2018
10 answers
577 views

I am getting this exception while automating using ArtOfTest.WebAii in VS2017, what could be the reason.

threw exception: 
System.TypeInitializationException: The type initializer for 'ArtOfTest.WebAii.Core.Settings' threw an exception. 
---> System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, 
Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.

Elena
Telerik team
 answered on 18 Sep 2018
1 answer
183 views

hello all,

can you please help me to fix this "The type initializer for 'ArtOfTest.WebAii.Core.Settings' threw an exception."

and how to use Settings my settings = new Settings();

is their any reference to add or nuget packages.

Thanks.

Elena
Telerik team
 answered on 13 Sep 2018
3 answers
763 views

I am attempting to find controls in my WPF application using Automation IDs and it seems my test is not able to find them for reasons I do not understand. This is happening with every control I have tried so far. Other frameworks I am evaluating (Coded UI, White) are able to find the controls using Automation IDs without issue, so I am not sure why Telerik cannot.

 

All I am trying to do here is launch the application and then click the "X" button in the top right to exit it. Here is my code:

 

Settings settings = new Settings();
Manager manager = new Manager(settings);
manager.Start();
var startInfo = new ProcessStartInfo();
startInfo.WorkingDirectory = <REDACTED>;
startInfo.FileName = <REDACTED>;
Process process = Process.Start(startInfo);
Thread.Sleep(1000);
manager.ConnectToApplication(process);
WpfWindow mainWin = manager.ActiveApplication.MainWindow;

mainWin.Find.ByAutomationId<Button>("PART_CloseButton").User.Click();

 

And here is the error information:

 

Test Name:    TelerikTest
Test FullName:    TelerikTest.UnitTest1.TelerikTest
Test Source:    C:\git\UITestPrototype\TelerikTest\UnitTest1.cs : line 18
Test Outcome:    Failed
Test Duration:    0:00:34.0393404

Result StackTrace:    
at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
   at ArtOfTest.WebAii.Silverlight.VisualWait.ForExistsInternal(Int32 timeout, Boolean invertCondition)
   at ArtOfTest.WebAii.Silverlight.VisualWait.ForVisible(Int32 timeout)
   at ArtOfTest.WebAii.Silverlight.VisualFind.ReturnOrThrow(FrameworkElement e, String throwMessage)
   at ArtOfTest.WebAii.Silverlight.VisualFind.ByAutomationId(String id, String xamlTag)
   at ArtOfTest.WebAii.Silverlight.VisualFind.ByAutomationId[T](String id)
   at TelerikTest.UnitTest1.TelerikTest() in C:\git\UITestPrototype\TelerikTest\UnitTest1.cs:line 33
Result Message:    
Test method TelerikTest.UnitTest1.TelerikTest threw exception:
ArtOfTest.Common.Exceptions.FindElementException: Element Not found!
FindExpression used:
[automationid 'Exact' PART_CloseButton] AND [xamltag 'Exact' Button]

 

For reference, here is the failing line of code written using White:

 

mainWin.Get<Button>(SearchCriteria.ByAutomationId("PART_CloseButton")).Click();

 

This code works perfectly so I know it is not a problem with the control not being there or the automation ID being wrong.

 

Does anyone have any idea what my problem could be? Thanks.

Nikolai
Telerik team
 answered on 07 Sep 2018
3 answers
166 views

Hi All

I am using Telerik Test Studio for Automation Testing . I am facing issue related to "Element no found" .

I have added element ("Gateway Name") in the DOM and object that needs to be identified is available in one of the Cell, after rebuild project .. I run my test cases and I am getting an error "element not found".

Is there any other way to store element permanently in the DOM because I have added "Gateway Name" element so many times in the DOM.

Please provide the solution for identifying these dynamic objects

Regards

Elena
Telerik team
 answered on 05 Sep 2018
1 answer
82 views

Is any possible  access element by Uid?

Or What can Uid do?

It's the my Xmal code

Is it use Find.ByAutomationID?

<button Name="OKButton" Uid="43512247">
Elena
Telerik team
 answered on 05 Sep 2018
3 answers
100 views

How Can I do automation for RadDataForm Control in WPF.

 

E.g - I did Automation for RadComboBox using - "TestStack.White.UIItems" API.

 

Did TestStack.White.UIItems API support for RadDataForm control? If so please post.

 

 

Elena
Telerik team
 answered on 04 Sep 2018
7 answers
1.4K+ views
If i have a scenario to test whether 2 elements on the page are visible

Assert.IsTrue(Element1.IsVisible());
Assert.IsTrue(Element2.IsVisible());


In my test method if first Assert fails, i do not want to stop the execution, is there a mechanism where in i can continue the execution of second assert statement??

Elena
Telerik team
 answered on 20 Aug 2018
15 answers
558 views
I am having trouble getting to elements within an iFrame. I believe I have the iFrame identified but getting in to the iFrame seems to be escaping me. I have looked through the forums and documentation for the past couple days but cannot seem to get it.

When the desired iFrame is identified, there are no children to the iframe tag. Does this need to be cast to a new browser? Do I take the src attribute and use that within a new Browser element?

Any help would be appreciated.
Elena
Telerik team
 answered on 06 Aug 2018
1 answer
154 views

Hi,

for some reasons (one of them simpler test construction) I'd like to run the WPF app to be tested within the same process as the test runner, thus being able to access some interfaces in the running app, e.g. setting some properties in the ViewModel.

I suceeded to some degree by constructing the app instance in the preparation of the test, then running it in a separate thread and then doing a ConnectToApplication(Process.GetCurrentProcess()). Access to the ViewModel also works fine via Dispatcher.Invoke on the app's UI thread.

Summary:

01.public void MyTest()
02.{
03.      // run app in-process
04.      MyApp app;
05.      var dispatcher = DispatcherFactory.CreateDispatcher("Hugo", ApartmentState.STA);
06.      dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
07.      {
08.        app = new MyApp();
09.        app.Run();
10.      }));
11. 
12.      // wait for app window
13.      var testApp = Manager.Current.ConnectToApplication(Process.GetCurrentProcess());
14.      var appWnd = testApp.WaitForWindow("MyApp");
15. 
16.      // access some app API
17.      dispatcher.Invoke(DispatcherPriority.Normal, new Action(() => { SingletonInApp.Foo(); }));
18. 
19.      // stimulate some UI action
20.      var theButton = appWnd.Find.ByAutomationId<Button>("a_idTheButton"); // <=== THIS FAILS
21.      theButton.User.Click();
22. 
23.      // ...
24.}

 

However, as soon as I subsequently use any method to find an UI element, it fails with the error shown below.
Is there any reason why the above construction would not work in general? How can I overcome that error?

 

System.ApplicationException : Exception thrown during the wait for a condition.
Error: Unexpected error while waiting on condition.
Error: ArtOfTest.WebAii.Silverlight.ExecuteSilverlightCommandException:
[WPF Extension Error] Details: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei Telerik.TestingFramework.XamlExtension.ClientServices.SerializeNode(DependencyObject root, StringBuilder sb, List`1 popups)
   bei Telerik.TestingFramework.XamlExtension.ClientServices.SerializeAllVisualTrees()
   bei Telerik.TestingFramework.XamlExtension.ClientProcessor.ProcessCommand(String command)
   bei ArtOfTest.WebAii.Wpf.WpfProxy.ExecuteSLCommand(SilverlightCommand cmd)
   bei ArtOfTest.WebAii.Wpf.WpfProxy.GetAllVisualTrees()
   bei ArtOfTest.WebAii.Wpf.WpfWindow.RefreshVisualTrees()
   bei ArtOfTest.WebAii.Silverlight.VisualFind.RefreshRoot()
   bei ArtOfTest.WebAii.Silverlight.VisualWait.WaitForExistsByFindInfo(VisualFindInfo findInfo)
   bei ArtOfTest.Common.WaitAsync._worker_DoWork[T,V](Object waitParam)
Stack Trace:
     bei ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
     bei ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
     bei ArtOfTest.WebAii.Silverlight.VisualWait.ForExistsInternal(Int32 timeout, Boolean invertCondition)
     bei ArtOfTest.WebAii.Silverlight.VisualWait.ForVisible(Int32 timeout)
     bei ArtOfTest.WebAii.Silverlight.VisualFind.ReturnOrThrow(FrameworkElement e, String throwMessage)
     bei ArtOfTest.WebAii.Silverlight.VisualFind.ByAutomationId(String id, String xamlTag)
     bei ArtOfTest.WebAii.Silverlight.VisualFind.ByAutomationId[T](String id)

 

Elena
Telerik team
 answered on 23 Jul 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?