Telerik Forums
Test Studio Forum
11 answers
22 views

Hi,

In a web test I need to click an element defined by Xpath in a Coded Step:

* I need to do it in a coded step because I need some logic (while loop with try-catch)

* I need an xpath because it is best practice and more stable than any element definition auto-generated by Telerik

Here is my snippet:

int i = 1;

 

Element e = Find.ByXPath("(//i[@class=\"dx-icon dx-icon-close\"])[" + i.ToString() + "]");
Actions.Click(e);

 

Log:

InnerException:
System.ArgumentNullException: The target Element object passed in for this action is null. Action aborted. Possible causes to this exception is the element not present in the page markup and the Find.Byxx returning null.
Parametername: TargetElement
   bei ArtOfTest.WebAii.Core.Actions.ValidateTargetElement(Element targetElement)
   bei ArtOfTest.WebAii.Core.Actions.Click(Element targetElement)
   bei TestProject6.Login.Login_Schließe_Alle_Tabs_In_MDE() in c:\Dev\TestAutomation\Testfälle\Schritte\Login.tstest.cs:Zeile 66.

 

When I pause the test execution before executing the code, open the Developer tools and search for the xpath in the DOM, I find the desired result. So I wonder why the element seems to be null.

Elena
Telerik team
 answered on 12 Feb 2021
4 answers
14 views

Hey guys,

So I am doing a Load Test and I see you can dynamically assign dynamic Targets
In my case this is sessionIDs from a .csv file I Bound to the test already.

This is working good so far, SessionIDs are replaced in the Request Headers succesfully.

BUT:

There are instances where we send the sessionID in the Request Body, instead. I see I can manually edit the Post Data in the "Edit User Profile" popup, but I would like to make it dynamically choose a sessionID from my .csv file
I also tried adding a Custom Dynamic Target until I realized These affect Response(!) Body rather than Request(!) Body.

So my Question is:
Is there a way to tell TestStudio to dynamically replace Values in the Request Body?
Plus is there an easy way to bulk-do it or globally Change it? Because I would like to avoid doing this hundreds of times over.

 

Thanks and Kind regard
Ben

 

 

 

 

 

Elena
Telerik team
 answered on 12 Feb 2021
7 answers
7 views

Hello,

I can't re-activate the licence of Test Studio 2017 even if a seat is available.
It was working before this month.

Any help or information is welcome.

 

Best regards.

Plamen Mitrev
Telerik team
 answered on 08 Feb 2021
3 answers
10 views

Hello.

I need to verify that multiple elements in a WPF app are highlighted when the mouse hovers a specific WPF element. Typically, when in test recording mode, you can easily right click the element to bring up the Test Studio functions to create an image verification step of the selected element. The problem is that when I hover the element and go to right-click to capture the image of the hovered element states, the right-click removes the mouse hover applied to the element that leads to the other elements being highlighted. 

I read some other Test Studio documentation and I saw that you can upload images for use in the image verification step. The thought was that we could make our own screen grab of the desired state and upload the image file into the image verification step. The issue is that this piece of documentation is recording for a web application but my colleague and I don't have the same image preview options in our Test Studio desktop (2020.3) or VS plugin as shown in the url below. https://docs.telerik.com/devtools/teststudiodev/features/recorder/verifications/image-verification

Would someone be able to help determine how we could ensure that select WPF elements become highlighted when the mouse hovers a respective WPF element? Is this something we should consider making a coded step for?

Thank you.

Plamen Mitrev
Telerik team
 answered on 03 Feb 2021
13 answers
12 views

Hi,

I've recorderd a test that selects a day in a personel plannings system. The day selected is the 5th of January by clicking on a timeblock/day in the planning application. But when I run the test today or yesterday or tomorrow the exact same day, January 5 is selected. 

I want the test to select the current day every time it runs. So when I run the test on February 7 it should select February 7. But when I run the test on April 14 it should select April 14. 

How can I adjust the test step so that I can run the test every day with  selecting the current day?

 

Elena
Telerik team
 answered on 29 Jan 2021
6 answers
8 views

Hi,

I want to execute the loop pictured in attachment "loop.png". Both the loop and the "Click"-command are marked as "Continue on Failure".

The button that is supposed to be clicked is the button to close a tab on the website. The loop is supposed to close all tabs. Hence, the loop is expected to have failed executions if there are less than 10 tabs open. As the step is marked as "Continue on Failure" I would assume that the test execution is not failing if these steps are failing.

When I execute the test, the loop will close all tabs on the website. Some loop iterations will fail as there are no more tabs to close. When the loop is being executed for the 10th time, the test fails. The log is attached: log.zip.

What optiosn do I need to enable to make sure that failed command executions do not result in a failed test?

Elena
Telerik team
 answered on 21 Jan 2021
8 answers
10 views

Hi,

We are experiencing random failures in our current suite of smoke tests that we run against our application. They are usually very stable however, we have recently implemented a service worker on the application and now the tests are failing.

The test step that is failing is a simple click a button and then verify that a div is displayed. We have tested the changes manually and there are no issues with the changes.

We then reverted the build of our application to exclude the service worker change and all tests ran successfully.

Has anyone experienced this issue related to service workers and Telerik failures before?

Plamen Mitrev
Telerik team
 answered on 20 Jan 2021
3 answers
6 views

Hello,

I try to setup Telerik for our customer. In their infrastructure, there is a virtual machine running with a Telerik Execution Server License. We want to have a number of Telerik clients that can checkout test cases from a git repository. These clients should be able to manually start test cases that are executed on the Remote Execution Server.

 

I setup the server with one admin: It is constantly running with admin privileges, the browsers als calibrated and the Telerik plugin is installed in Chrome. We used the default ports.

The firewall allows connections via ports 8009, 8492 and 55555. I verified that I can connect from my local laptop.

In my local Telerik installation, I can connect to the machine (See Screenshot "Scheduling Server Settings.png).

Under Tab "Test Lists" I added a Test case that successfully runs on my local machine. When I choose that Test List and choose "Run List Remotely", I can see the Remote Execution Server (See screenshot "Run Test List Remotely.png").

But when I click "Run Test List" it's stuck at "Uploading latest project files" with the error message "Running test list failed internally due to unhandled error". In the Log I see the following:

[01.14 11:01:04,Telerik.TestStudio.Scheduling.Client.exe(10116:18),Execution] WindowsMachineMonitor.GatherProfilingResults() : Counter issue: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
[01.14 11:01:04,Telerik.TestStudio.Scheduling.Client.exe(10116:18),Execution] WindowsMachineMonitor.GatherProfilingResults() : EXCEPTION! (see below)
     Outer Exception Type: System.NullReferenceException
     Message: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
     HRESULT: 0x80004003 (Official ID (if app.) = E_POINTER, Error Bit = FAILED, Facility = FACILITY_NULL, Code = 16387)
     Call Stack:
          bei Telerik.TestStudio.ProcessManager.MachineMonitor.WindowsMachineMonitor.GatherProfilingResults()
 
[01.14 11:01:04,Telerik.TestStudio.Scheduling.Client.exe(10116:29)] First trace message from pool unnamed thread (managed ID = 29, native ID = 18904).
[01.14 11:01:04,Telerik.TestStudio.Scheduling.Client.exe(10116:29),Execution] ProcessManager.RefreshMachineStatusAsync() : Error trying to report to scheduling server: Fehler beim Senden der Anforderung.
[01.14 11:01:09,Telerik.TestStudio.Scheduling.Client.exe(10116:5),Execution] WindowsMachineMonitor.GatherProfilingResults() : Counter issue: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
[01.14 11:01:09,Telerik.TestStudio.Scheduling.Client.exe(10116:5),Execution] WindowsMachineMonitor.GatherProfilingResults() : EXCEPTION! (see below)
     Outer Exception Type: System.NullReferenceException
     Message: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
     HRESULT: 0x80004003 (Official ID (if app.) = E_POINTER, Error Bit = FAILED, Facility = FACILITY_NULL, Code = 16387)
     Call Stack:
          bei Telerik.TestStudio.ProcessManager.MachineMonitor.WindowsMachineMonitor.GatherProfilingResults()
 
[01.14 11:01:09,Telerik.TestStudio.Scheduling.Client.exe(10116:29),Execution] ProcessManager.RefreshMachineStatusAsync() : Error trying to report to scheduling server: Fehler beim Senden der Anforderung.

 

 

I suspect that I missed a detail during the setup. Can someone help?

Elena
Telerik team
 answered on 18 Jan 2021
5 answers
46 views

I need to use the value from a variable to find an element to click.

The variable value is being extracted from a database using C# (data binding won't work because I am already bound to the data, but this value did not exist at the time of binding).

The variable name is varDocID

I am trying to use it to compare to the OnClick event of the image I need to click in a grid with many instances of the same image.

~$(varDocID) does not work as it does not use the value and only tries to comapre to the variable name instead of the variable value.

Please advise.

Elena
Telerik team
 answered on 15 Jan 2021
1 answer
32 views

Hi, 

 

Good day. As part of our Continues Integration (CI), we wanted to integrate azure devops build pipeline into our telerik test studio automation framework (or vice versa) so we can test incoming new build. Can you please point me to the right direction on how i can achieve this? Currently we have an existing automation framework (via Telerik Test Studio) which is triggered manually at the moment. 

 

Thank you

Elena
Telerik team
 answered on 14 Jan 2021