Telerik Forums
Testing Framework Forum
1 answer
13 views

Hi Team,

I am trying chromeheadless now, most of the UI operations could work, but for keybord, which do not work, like below:

Manager.Current.Desktop.KeyBoard.KeyDown(Keys.Alt);
Manager.Current.Desktop.KeyBoard.KeyPress(Keys.End);
Manager.Current.Desktop.KeyBoard.KeyUp(Keys.Alt);

 

It's not always broken, when I use it in my case, the same code work for chrome, but broken for chromeheadless, i don't know how to debug the issue. Can you please help to check for us?

Message: 
    ExecuteCommand failed!
    InError set by the client. Client Error:
    Protocol error (Input.dispatchKeyEvent): Invalid 'text' parameter
    BrowserCommand (Type:'Action',Info:'NotSet',Action:'RealKeyboardAction',Target:'null',Data:'keyDown#$TS$#LMenu',ClientId:'1748F9AF024B6615B325B7310DF45C36',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'Protocol error (Input.dispatchKeyEvent): Invalid 'text' parameter')
    InnerException: none.


  Stack Trace: 
    ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
    InError set by the client. Client Error:
    Protocol error (Input.dispatchKeyEvent): Invalid 'text' parameter
    BrowserCommand (Type:'Action',Info:'NotSet',Action:'RealKeyboardAction',Target:'null',Data:'keyDown#$TS$#LMenu',ClientId:'1748F9AF024B6615B325B7310DF45C36',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'Protocol error (Input.dispatchKeyEvent): Invalid 'text' parameter')
    InnerException: none.
    Browser.ExecuteCommandInternal(BrowserCommand request)
    Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
    HeadlessKeyboard.PressOrReleaseKey(Keys key, Boolean release)
    KeyBoard.KeyDown(Keys code, Boolean delay)
    KeyBoard.KeyDown(Keys key)
    <.ctor>b__26_8() line 106

 

Thanks,

Jun

    
Elena
Telerik team
 answered on 14 May 2024
1 answer
22 views

I use ActiveBrowser.Cookies.GetCookies(BaseUri); to get browser cookie, cookie is got, but all expired cookie. The same code if I set chrome not headless, which could get un-expired cookie. Is it not supported yet?

Chrome headless:

Chrome:

Elena
Telerik team
 answered on 14 May 2024
1 answer
12 views

Hi Jun,

I tried not support, will got exception when lunch new browser, but still want to double confirm with team whether there's a possibility. 

Thanks,

Jun

Elena
Telerik team
 answered on 14 May 2024
1 answer
18 views
I searched lot, seems old version not support, not sure if the latest version support, but after I try not good. We also tried use keyboard to switch tab, which could switch successfully, but active browser will not switch.
Elena
Telerik team
 answered on 16 Apr 2024
1 answer
25 views

Hello,

I am currently evaluating Telerik Test Studio Dev Edition (Visual Studio Plugin) with a trial license.
I successfully created a few WPF Tests in a sample application I created from scratch using .NET 6, WPF and some Telerik UI for WPF components (e.g. RadGridView). Here, the recording works perfectly. When I click on Start by recording Test Steps, the application starts, gets unresponsive for ashort while (~3 sec.) and then the Recorder overlay appears and I can record the test.

But then I tried to automate tests for a small tool, let's call it SmallTool, which is also a .NET 6 WPF application. But here, recording only works by using a Desktop Test. This limits the available test steps significantly (e.g. I cannot "evaluate the third item in this List"), so the tests become useless.

Here are the differences between my sample project and SmallTool that I notice:

  • SmallTool does not use any Telerik UI lib
  • SmallTool does use two COM references (for interaction with outlook)

I also already checked the Desktop Application Will Not Record support article. My SmallTool did appear as a WPF application.

Can you help me with getting WPF tests to work?

Log output in the Test Studio log:

<see attachment "teststudioLog - Kopie.txt">
Elena
Telerik team
 answered on 18 Jan 2024
1 answer
109 views

Recently we found an issue about popup in Edge.

when we do some wrong behaviors, alert will show up. just like this (https://demo.atata.io/products).

And we used dialogElement(the namespace is ArtOfTest.Common.Extensions) to catch the message. It works but after that we can't control the page. Whatever we tried like refresh the page or press enter by code, it always stuck until alert is closed manually or time out. Is there some one has the same situation? And if so, how to solve it? 

Below is the code:

Elena
Telerik team
 answered on 19 May 2023
2 answers
129 views

Recently we have had some problems by using ArtOfTest(telerik testing framwork using 2022 version).

There are some methods doesn't work after migrating to Edge (Version 111.0.1661.41 (Official build) (64-bit)) which IE is retired that we had to change the browser.

Below is the code after change. we have to control the mouse to click popup and copy the message which should work by using AlertDialog of ArtOfTest. So is there some new solution or better way to fix this issue?

Manager.Current.DialogMonitor.AddDialog(new AlertDialog(Manager.Current.ActiveBrowser, DialogButton.OK));
            Manager.Current.DialogMonitor.Start();
            // to retreive pop up text
            var message = element.GetAttributeValue("onclick");

 

Ranjian
Top achievements
Rank 1
Iron
 answered on 10 May 2023
1 answer
239 views
how to launch Silverlight application using telerik testing framework in Microsoft edge browser
Elena
Telerik team
 answered on 13 Jan 2023
2 answers
344 views

Hello, 

I am having difficulty running tests using Telerik Testing Framework on a new laptop that was provided by my employer.  The framework works fine on my old machine, but I believe a firewall rule may be interfering with the Framework's ability to communicate to the browser or some kind of proxy.

When my test executes the line Manager.LaunchNewBrowser(configured to use a default browser of Chrome), I get this error:

System.ServiceModel.FaultException : The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.

Server stack trace: 
ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]: 
RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
IBrowserLauncher.LaunchBrowser(ILauncherOptions launchOptions)
HostsProxy.LaunchBrowser(ILauncherOptions launcherOptions)
ChromiumActions.LaunchCDPManagedBrowser(String startUrl, BrowserType browserType, Boolean windowVisible, String pathToBrowserExecutable)
ChromeActions.LaunchNewBrowserInternal(Boolean useExtension, String startUrl, Boolean disableWebSecurity, ProcessWindowStyle windowStyle)
ChromeActions.LaunchNewBrowserInstance(ProcessWindowStyle windowStyle, Manager manager)
Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
Manager.LaunchNewBrowser()
ManagerHook.LaunchBrowserAndBuildScenarioContainer() line 131

If I configure the default browser to FireFox, then the test runner seems to work.

The test runner works with Chrome on my old machine, so that leads me to believe that it is a security issue on my new machine.  I want to approach my tech support with details about what might need to be opened up on the firewall in order for this to work.

Can you provide guidance on what endpoints this might be trying to hit and are getting refused?

Or can you provide guidance on how to get more details about this FaultException? 

Thank you!

 

Jim
Top achievements
Rank 1
Iron
 answered on 14 Dec 2022
1 answer
818 views
We have a number of master/child data grids that I am having trouble testing.  The IDs are dynamic and I am unable to find a consistent way of accessing the master and child grids.  As an example, you can look at the demo on the Devextreme website.  https://demos.devexpress.com/ASPNetCore/Demo/DataGrid/MasterDetailView/  This does have a static ID for the master, I can't find any examples that don't.  In my test, I will need to select at least two different master records by clicking the caret to open the child grids.  The demo is read only but I will need to add rows and enter data into my child records.  Do you have any suggestions?
Plamen Mitrev
Telerik team
 answered on 12 Aug 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?