Telerik Forums
Testing Framework Forum
2 answers
80 views

Hello,

I am trying to construct a new load test but I am running into an issue when examining our website that starts off as 'http' and has no 'www.' in the url.  I am redirected to a page that I cannot move forward with (see attached).  Please advise.

Thanks,

Tom

Thomas
Top achievements
Rank 1
 answered on 09 Nov 2017
55 answers
385 views
Problem
Sometimes our tests fail due to problems finding a component in a dialog window, and reports that the dialog itself cannot be found. According to the screenshot the dialog is visible though. This is not a very frequent issue, but it generates lots of "faulty" test results, which is very annoying. Sometimes the issue isn't seen in any testrun on any agent for several days. That means successful opening of thousand of dialogs. Then suddently the problem could occur at the 23:rd iteration of a memory leak test run that navigates back and forth between views / dialogs...  


Implementation
Worth mentioning is that we have created a wrapper around the testing framework and have implemented our own Proxies and Waiting classes in order to have more control of the "identification procedure". To summarize and simplify how our identification procedure works:

1) Identify that the Manager.Current.ActiveApplication and it's process is responding
2) Get the Window in which to look for the UI component by the expected window caption - Manager.Current.ActiveApplication.GetWindow(<<<WindowTitle>>>)
3) Refresh the visual tree
4) Use the VisualFind as root to find the expected element

The Waiter classes loops over this over and over again until the element is found OR the loop times out OR a critical issue occurs during the identification procedure. There is no "waiting" going on in any of the steps to wait for a window or a process to respond or similar. 

When the tests fail because of that it can't seem to find the dialog which is apparently visible on screen according to the screenshot, it has been looping over the mentioned steps with a timeout of 100000 ms... With a polltime set to a minimum of 25ms it means lot's of refreshing has been done etc, and all of the failures are reported to occur in the 2nd step, about finding the window with a certain caption.


Investigation
According to the tracelog it looks like the Manager._windowMonitor_WindowOpened() never get's called in this case as it usually does when the system identifies a new window. As far as I have understood by reverse engineering the framework source, that would mean that this window never gets added to the list of windows in WpfApplication.Windows either, which is the list in which the framework looks when calling Manager.Current.ActiveApplication.GetWindow(<<<WindowTitle>>>). Unfortunately I cannot provide any full trace log when this issue occur at the moment.


Has anyone else experienced this problem? Is it a known issue..? The issue still exists running the 2014.4 version of the testing framework.

Any comments or help would be very much appreciated.
 













Elena
Telerik team
 answered on 02 Nov 2017
10 answers
152 views

I am using Kendo UI MVVM in my site. I am building tests with the Testing Framework.

I find the HtmlInputControl and assign the Value, I can see it fill in on the page.

I then call input.InvokeEvent( ScriptEventType.OnBlur ); to try and force the Kendo MVVM to assign the value to the model.

It does not seem to work for plain inputs (type=text) or textarea's. Kendo UI ComboBox, Autocomplete, NumbericInput do work with the above process.

Any ideas?

 

 

 

 

 

Elena
Telerik team
 answered on 24 Oct 2017
12 answers
169 views

I'm currently running into a problem with an automated Firefox test where it hits an warning and a dialog box pops up. I've attached a screenshot of the dialog box. I want to have WebAii click "Continue" and move on through the test. I have the following code and it catches the dialog box but doesn't press "Continue". I've also tried to circumvent the issue by disabling all warnings that could relate to this. I have also tried changing the buttonID Parameter from 0-2 and it seemed to have no effect. Any insight would be greatly appreciated.

GenericDialog securityWarningDialog = new GenericDialog(scenario.Manager.ActiveBrowser, "Security Warning", false, 0);   
  
scenario.Manager.DialogMonitor.AddDialog(securityWarningDialog);
  
scenario.Manager.DialogMonitor.Start(); 
  
browser.Actions.Click(loginButton); 
  
scenario.Manager.DialogMonitor.Stop(); 
  
Assert.IsTrue(scenario.Manager.Browsers.Count == 1); 
Elena
Telerik team
 answered on 20 Oct 2017
5 answers
109 views

Hi,

Is it possible to get the element with <No Name>?

Using "ByExpression" I need to get a value: "Value is too large [> 40]"

I try to like this: 

Example1:

ContentPresenter searchScroll = WindowScreenActuarialAssumptions.MainWindow.Find.ByExpression(new XamlFindExpression("DataContext='Value is too large [> 40]'")).As<ContentPresenter>();

 

Example2: 

            var txtBlock = WindowScreenActuarialAssumptions.MainWindow.Find.ByTextContent("");

 

 

Elena
Telerik team
 answered on 10 Oct 2017
6 answers
282 views

Hi team,

The application under test is asking to enter some values in a dialog (Capture 1) and when I recorded, it shows as a Prompt Dialog (Capture 2).

  1. I need to verify whether this dialog exists
  2. Then, I need to enter some value and click on either Ok or Cancel button

I added a step to handle this dialog but when the script is running Test Studio is unable to enter provided value and click on the button. 

This dialog can be dragged over the page.

I've gone through your threads but couldn't find any for handling Prompt dialog.

Could you please provide a sample coded step to handle above two instances for Prompt dialog?

 

Regards,

Harsha

Elena
Telerik team
 answered on 05 Oct 2017
4 answers
118 views

Hello

I tried to run containd in QuickStarts_NUnit_CS  from the install to no avail.

1, Created new project from existing code, in VS community 2017

2, selected C#

3,Select the location of where to find the code as \QuickStarts_NUnit_CS

4,gave it a name

5,selected class library

A new project is created but, I had to manually link to ArtOfTest dll to make many error go away,

Plus the using nunit,framework statment is "not found" , right now I am have trouble locating where nnunit.framework is

It is installed, and I found it easily enough when using a visual studio unit test solution.

Please help

 

Ola

Nikolay Petrov
Telerik team
 answered on 27 Sep 2017
17 answers
312 views

Hello!

 

I have been running into trouble running tests from TFS 2017 builds for several weeks now. I will do my best to sum up the situation and point out important details.

 

I have a c# project containing my UI tests that use ArtOfTest.WebAii.dll. The general structure of the tests is: 

 

01.try
02.{
03.    log.Info("Starting ConnectAndDisposeTest");
04. 
05.    var manager = new Manager(true);
06.    Process proc = Process.GetProcessesByName("WPF").FirstOrDefault();
07.    if (proc == null)
08.    {
09.         log.Info("Launching app");
10.         manager.LaunchNewApplication(@"C:\repo\WPF.exe");
11.         log.Info("Launched app");
12.    }
13.    else
14.    {
15.    log.Info("Connecting to app");
16.    manager.ConnectToApplication(proc);
17.    log.Info("Connected to app");
18.    }
19. 
20.    log.Info("Disposing");
21. 
22.     manager.Dispose();
23. 
24.    log.Info("Disposed");
25.    await Task.Delay(1.Seconds());
26.    }
27.    catch (AppDomainUnloadedException ex)
28.    {
29.    log.Fatal(ex);
30.    }
31.    catch (Exception ex)
32.    {
33.log.Error(ex);
34.    }
35.}

 

When I run this test with  `vstest.console.exe .\WPFTest.dll /TestCaseFilter:FullyQualifiedName~ConnectAndDispose /InIsolation`, I see the following error in the console:

Warning: System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain. This can happen if the test(s) started a thread but did not stop it. Make sure that all the threads started by the test(s) are stopped before completion.

 

In addition to this, when TFS runs these tests as part of the `Run Functional Test` task (https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/RunDistributedTests/README.md), the test runner intermittently stops responding, stops sending results to TFS, and causes the test runner for that machine to abort and fail those tests.

 

I've done nearly everything I can to try to identify what might be causing the hanging/unresponsive behavior, but I've reached the end of my expertise. What can I do to diagnose the problem and/or work around it to prevent the test runner from hanging? Is it possible that this `System.AppDomainUnloadedException` is causing this unresponsive behavior? 

 

Please let me know if you need additional details. Thank you!

Elena
Telerik team
 answered on 20 Sep 2017
1 answer
261 views

Hi all,

we just started to write UI tests, and we want to write them programmatically, e.g. w/o recording. With the setting of Automation IDs and the corresponding Find calls, this works as expected. On the other hand - this is the same result as with Selenium and the Appium driver. So I thought I could use the TTF to get a bit further.

Now what I wanted to to is to get a content element and observe its datacontext. Is that possible? Something like

var detailsView = SutSession.MainWindow.Find.ByAutomationId("DetailsRegion").As<ContentControl>();
detailsView.DataContext.ShouldBeOfType<FlightViewModel>();

Bat as far as I can see, I only get the TTF wrapper classes as a result, getn't I?

Elena
Telerik team
 answered on 30 Aug 2017
1 answer
133 views

Hello,

I'm currently use TTF for a silverlight application using Telerik UI !

How select an item in a RadGridView Cell containing a combo box with TTF automation ?

I can browse the ragGridview using this kind of code in the testing method :

 

RadGridView rgvbt = app.Find.ByName<RadGridView>("GridViewSelection");
rgvbt.Rows.First().Cells.First().User.TypeText(briqueTemplateAdd, 100);
rgvbt.Rows.First().Cells.Skip(1).First().User.Click();


but i don't know how select an item in the comboBox cell ?

Here is the xaml for the grid view portion containing the combo box :

<telerik:GridViewComboBoxColumn Width="*" Header="{Binding General.Format, Source={StaticResource ESBResources}}"
ItemsSourceBinding="{Binding TemplatesVM.BriquesElementaires, Source={StaticResource Locator}}"
DataMemberBinding="{Binding BriqueElementaire,Mode=TwoWay}" 
IsComboBoxEditable="False"  HeaderTextAlignment="Center"
>
<telerik:GridViewComboBoxColumn.CellTemplate>
    <DataTemplate >
        <Grid >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Image Source="{Binding BriqueElementaire.Image}" Width="20" Grid.Column="0"/>
            <TextBlock Text="{Binding BriqueElementaire.Format.Label}" Margin="10,0,0,0" Grid.Column="1"/>
            <Image Source="{Binding Images.Defilementbas, Source={StaticResource ESBResources}}" Width="10" Grid.Column="2" Margin="0,0,5,0"/>
        </Grid>
    </DataTemplate>
</telerik:GridViewComboBoxColumn.CellTemplate>
<telerik:GridViewComboBoxColumn.ItemTemplate>
    <DataTemplate >
        <StackPanel Orientation="Horizontal">
            <Image Source="{Binding Image}" Width="20"/>
            <TextBlock Text="{Binding Format.Label}" Margin="10,0,0,0"/>
        </StackPanel>
    </DataTemplate>
</telerik:GridViewComboBoxColumn.ItemTemplate>
</telerik:GridViewComboBoxColumn>

 

is there somewhere a portion of code to see how select an item in a GridViewComboBoxColumn with TTF automation ?

Nikolay Petrov
Telerik team
 answered on 23 Aug 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?