Hello everyone,
I am really new to Telerik Testing Framework and I found my first kind of a blocker. I need to locate a dropdown.
The HTMl is attached.
The following attempts are not successful:
RadDropDownList typeDropdown = manager.ActiveBrowser.Find.ByContent<RadDropDownList>("l:One off");
HtmlSelect typeDropdown = manager.ActiveBrowser.Find.ByContent<HtmlSelect>("l:One off");
When I try to locate it as a simple element and to click on it is OK:
var typeDropdown = manager.ActiveBrowser.Find.ByContent("l:One off"");
I am really sorry if my question is not clear or is on the wrong place.
Best reagrds,
Iliya I.
// Launch the application
WpfApplication wpfApp = Manager.Current.LaunchNewApplication(@"filepath");
// Click the File menu button
wpfApp.MainWindow.Find.ByTextContent("File").User.Click();
I run my tests in C# Visual Studio 2015. I have tried to use
‘Settings.ClientReadyTimeout’ and ‘Settings.ExecuteCommandTimeout,’ but these
do not seem to have an effect on this.
I am sure there is something silly that I am missing, as I
am new at test automation. I hope that someone can shed some light on this
issue and point me in the right direction.
Thanks,
-Enrique
Result Message:
Test method InternalPortalTests.AAALoginToImpersonation.AAALoginUsingImpersonation threw exception:
System.NullReferenceException: Object reference not set to an instance of an object.
The Element definition was:
public ArtOfTest.WebAii.Controls.HtmlControls.HtmlButton IAgreeButtonTag
{
get
{
return _manager.ActiveBrowser.Find.ByExpression<ArtOfTest.WebAii.Controls.HtmlControls.HtmlButton>("tagname=button", "InnerText='I Agree'");
}
}
The line that called the element is:
allpages.IAgreeButtonTag.Click(false);
The Dom Section I'm using is attached.
Any ideas?
I'm bewildered by how hard it is to get any TestStudio test converted to MStest to work.
Here is the sample code
[TestClass]
public class UnitTest1
{
private Manager m_manager;
[TestInitialize]
public void TestInitialize()
{
var mySettings = new Settings { Web = { DefaultBrowser = BrowserType.Chrome } };
m_manager = new Manager(mySettings);
m_manager.Start();
m_manager.LaunchNewBrowser();
}
[TestCleanup]
public void TestCleanup()
{
m_manager.Dispose();
}
[TestMethod]
public void NavigateToGoogle()
{
m_manager.ActiveBrowser.NavigateTo("https://google.com/");
}
}
Assuming the following build to a telerick.dll
This is the command I am using from cmd prompt
MSTest.exe /testcontainer:"C:\POC1\Telerik\Telerik\bin\Debug\Telerik.dll"
When I run using command I am getting the following error, it runs perfectly fine when I use VisualStudio.
<Message>Initialization method TelerikTestingFramework.UnitTest1.TestInitialize threw exception. System.TypeInitializationException: 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..</Message>
<StackTrace> at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo property, RuntimeType caType)
at System.Reflection.RuntimePropertyInfo.GetCustomAttributes(Type attributeType, Boolean inherit)
at ArtOfTest.WebAii.Core.Settings..cctor()
--- End of inner exception stack trace ---
at ArtOfTest.WebAii.Core.Settings..ctor()
Hello,
I will try to depict my scenario as best as possible:
Browser: Internet Explorer 11
To simplify: I have a rather simple Web Test in which I have to connect a Popup window and then download a file.
My code is like this:
//Connect to Popup
Manager.WaitForNewBrowserConnect("https://someWebAdresss", true, 15000);
Manager.ActiveBrowser.WaitUntilReady();
DownloadDialogsHandler handler = new DownloadDialogsHandler(ActiveBrowser, DialogButton.SAVE, savedLocation, Manager.Desktop);
//Trigger the dialog.
Manager.DialogMonitor.Start();
handler.WaitUntilHandled();
The issue I am facing right now is that the Download handling is really slow when executed with Telerik. By contrast, if I do this manually it's completely normal. Let me clarify this: the "toolbar" which offers the Save As appears but it takes (sometimes) a lot of time to execute. And then, when the download path is being set it also takes a lot of time.
What I would like to know is whether I am doing something wrong or if there is any way to speed up this.
PS: I have attached a sample of the download toolbar window to be more clear but this is not the actual image of my test.
Regards,
Sebastian
Hello.
Telerik Testing Framework try to simulate mouse click (UserInteraction.Click) using method SendInput to interact with application, but mouse click does not occur.
The main reason is that method SendInput used in x86 architecture maner.
Structure ArtOfTest.WebAii.Win32.Input does not support that in x64 length of field type 8 instead 4.
The problem is discussed in my question on stackoverflow - C#: The unmanaged method SendInput does not work with different representation of the structure .
The main question is whether the Testing Framework supports architecture x64?
If yes, can you fix that problem?
If no, can you throw exception at test initializing? - It is common practice that users immediately understand the problem.
Hi,
I am using Telerik Testing Framework for UI automation. I have a test in which WaitForNewBrowserConnect() is throwing an exception only in Firefox browser and the same test works fine in IE, Chrome. Previously when we faced this issue, we resolved by using SetNewBrowserTracking(True). But however, no approach is working for now. We also tried calibrating the Firefox browser after the update but to no avail.
.SetNewBrowserTracking(true);
docLink.MouseClick();
myManager.WaitForNewBrowserConnect("help", true, 30000);
myManager.ActiveBrowser.WaitUntilReady();
myManager.SetNewBrowserTracking(false);
result = myManager.ActiveBrowser.PageTitle;// Getting the Help title to a string.
myManager.ActiveBrowser.Close();//Closing the Help
Setup details -
Browser - Firefox Quantum (57.0.2 (64-bit))
Extension - Progress Test Studio Version 2017.3.103.1
Testing Framework - 2017.3.1206.0 (ArtOfTest)
Hi,
we evulate different Test Automation Tools and in Test Studio we have a Problem.
If i select for a record the Firefox Browser than the test studio closed by itself.
We use Firefox ESR 45.9.0
Test Studio apparently does not recognize the version.
Best Regards
Fabian
Hi Admin,
I am trying to automate a application in which on switching from one page to another page execute command failed exception comes.
Switching happens when a button is clicked on home page using click() method which switches to another page of application.
Error generated is below
ExecuteCommand failed!
BrowserCommand (Type:'Information',Info:'IsReady',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_8b8c8968-8891-495b-b872-90eb95904be1',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')
InnerException: System.IO.IOException: Pipe is broken.
at System.IO.Pipes.PipeStream.WinIOError(Int32 errorCode)
at System.IO.Pipes.PipeStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Pipes.PipeStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.WriteCommandToPipe(PipeCommand command, PipeStream pipe, Boolean waitForDrain)
at ArtOfTest.WebAii.Messaging.Process.BrowserRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId)
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
After this exception the active browser becomes null
ActiveBrowser.IsConnected gives false and also Manager.ActiveBrowsers count is 0
Note:- When i run the test in debug mode and when i perform the click () operation the following exception is not received and ActiveBrowser.IsConnected comes true and after that test runs smoothly
Solution Tried:-
I have applied Thread.Sleep(10000) before click on the button which takes me to next page and
also after clicking the button.