我想問一下這個WPF ComboBox如何獲取它的Item,
我從Snoop Tool檢查了它的xaml,並了解到當前應用程序Xaml中不存在Popup的內容。
這個問題就像日期選擇器
我正在使用Testing Framework Automation編寫C#測試腳本
謝謝
Repro steps:
1. Start SUT with another automation framework (TestStack.White) in my case
2. Create an instance of Manager and call ConnectToApplication(int processId)
Expected: The call takes less than 1 sec
Actual: On one machine it takes less than 1 sec, on the other approx. 1 min
Machine with 1 sec:
Windows 10 64 bit, TestStudio Trial from online installation
Machine with 1 min:
Windows 7 32 bit, TestStudio trial from offline installation..
Any help would be greatly appreciated.
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.
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.
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.
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
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"
>
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.