Telerik Forums
Testing Framework Forum
18 answers
331 views

I have an MVC application in which a view contains a Kendo Grid htmlhelper.  As such, I just specify the columns in the grid, and when the view is loaded it adds the rows and data based on the data source:

@(Html.Kendo().Grid<CustomerJob>()
                            .Name("customerJobGrid")
                            .DataSource(dataSource => dataSource
                                .Ajax()
                                .Sort(sort =>
                                {
                                    sort.Add("IsFavorite").Descending();
                                    sort.Add("JobNo").Descending();
                                })
                                .Read(read => read.Action("Jobs_Active_Read", "DashBoard"))
                                .Model(model => model.Id(p => p.JobNo)
                                )
                            )
                            .Columns(columns =>
                            {
                                columns.Template(p => { }).ClientTemplate(
                            "# if(IsFavorite == 1) { #" +
                                "<span id=\"star-#=NavCustomerNo#-#=JobNo#\" class=\"favorite-star glyphicon glyphicon-star\"></span>" +
                             "# } else { #" +
                                "<span id=\"star-#=NavCustomerNo#-#=JobNo#\" class=\"favorite-star glyphicon glyphicon-star-empty\"></span>" +
                             "# } # "
                            ).Width(50);
                                columns.Bound(p => p.CustomerName).Title("Account");
                                columns.Bound(p => p.Nickname).Title("Name");
                                columns.Bound(p => p.JobNo).Title("Job ID").Width(90).MinScreenWidth(768);
                            })
                            .Pageable()
                            .Sortable()
                            .Scrollable()
                            .Filterable()
                            .Mobile(MobileMode.Disabled)
                            .Selectable(selectable => selectable
                                         .Mode(GridSelectionMode.Single)
                                         .Type(GridSelectionType.Row))
                                        .Events(events => events.Change("onChange"))
                            .HtmlAttributes(new { style = "height:400px;" })
                )

So in the view, I can click within a cell in the grid and it will take me to a page specific for that row.

I would like to automate this using the test framework, so my test can find a cell either by a specified row and column or by a specified text content, and then click in that cell.

I did find this thread, but it's specific to an actual Kendo UI Grid:  http://www.telerik.com/forums/automating-kendo-ui-controls

I need help with this for the htmlhelper version.

Thank you!

Elena
Telerik team
 answered on 29 May 2017
5 answers
282 views
Hey, telerik

is there any translator for kendo UI dropdownlist ? If you do/don't have, could you give sample snippet of codes how to select list item?

Thanks, 
Rick
Top achievements
Rank 1
 answered on 24 May 2017
1 answer
153 views

Using the Find.ByAttributes<T>() method I am able to find a specific control in the DOM, but once found I cannot cast it to a more specific type, HtmlInputText. The control is an input field, which can be seen in the HtmlControl properties. I then attempt to cast the HtmlControl by simply:

HtmlInputText _email = ctrl as HtmlInputText; (ctrl is the generic HtmlControl)

I could work with the HtmlControl, but there are specific methods and properties that the HtmlInputControl has that the more generic HtmlControl does not.

I was hoping to find any feedback on why the casting could not be done, when the HtmlControl returned was an input control.

Elena
Telerik team
 answered on 16 May 2017
1 answer
138 views

How to get a vaule form TextBlock for FontSize.

I need to get number 14 !

 

<TextBlock Grid.Row="1"
                                   TextWrapping="Wrap"
                                   Margin="5"
                                   Name="TextBlockAbout"
                                   FontSize="14">
 </TextBlock>

 

var fSize = TextBlockAbout.GetProperty<TextBlock>("FontSize");

 

Regards,

Peter

Nikolay Petrov
Telerik team
 answered on 15 May 2017
5 answers
209 views

Hello,

I am having a problem with Manager.ActiveBrowser.Frames.ById() returns null intermittently. The conditions are as follows:

  var resultsFrameExpression = new HtmlFindExpression("tagname=iframe", "id=searchResultsFrame");        

  browser.WaitForElement(resultsFrameExpression, 60000, false); // Successfully returns

  browser.RefreshDomTree();

-!!->  resultFrame = browser.Manager.ActiveBrowser.Frames.ById("searchResultsFrame");

Most of the time, resultFrame comes back with a valid result. Sometimes it comes back as null. If there is even a 10 second delay before calling RefreshDomTree() and trying again, it still occurs with about the same frequency. (My assumption was that there may have been a timing issue between WaitForElement()'s successful return before being able to access the element that it successfully claims exists, but this is not the case either.

Any insight as to what I am doing wrong here would be appreciated.

 

Thanks for your help

 

Nikolay Petrov
Telerik team
 answered on 03 May 2017
1 answer
240 views

Hi, 

Do you have some documentation how to run WPF application and use Specflow?

    class dTrackingTTF :BaseWpfTest
    {
     
        [Given(@"I run the application UK Risk Analyzer")]
        public void GivenIRunTheApplicationUKRiskAnalyzer()
        {

            Manager.LaunchNewApplication(@"C:\Desktop.exe");
            Manager.ActiveApplication.Manager.ActiveApplication.MainWindow.Find.ByTextContent("Daily monitoring").User.Click();         
       }

 

I get an error: 

System.NullReferenceException: Object reference not set to an instance of an object.

 

Regards,

Peter

Elena
Telerik team
 answered on 17 Apr 2017
6 answers
366 views

Hi,
 
I have written a set of test which get exceuted using webii and VSTS (C# .net). I need to implement he following in code

1. The test should be repetable : I must be able to execute the same test n number of times (where n indictaes the number of run -can be preset)
2. Diffrent input for each run: I should be able to access a excel file from which i can have the inputs that are required for running the test e.g data values.

I went through this link http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/data-driven-testing/add-a-data-source.aspx#Excel  however wanted to implement the same in code.

Help appreciated...

Thanks!!
 
Kavita
Top achievements
Rank 1
 answered on 12 Apr 2017
2 answers
153 views

Hi, 

Is it possible to generate Page Object model pattern for WPF application?

Can you please write or give me one example?

 

Regards,

Peter

Elena
Telerik team
 answered on 11 Apr 2017
3 answers
165 views

Hi, 

I need to get a value from this Chart. Can somebody tell me about that how can I get a value?var rCC =

riskAnalyzer.Manager.ActiveApplication.MainWindow.Find.ByName("RadCartesianChart");

Elena
Telerik team
 answered on 06 Apr 2017
3 answers
179 views

Hi, 
I would like to ask how can I find RadCartesianChart on Visual Studio 2015 + Coded UI Test. 

http://www.telerik.com/teststudio/visual-studio-testing-plugin-benefits - This is same example for Grid. 

I try his but I can't have that option Find.ById

RadCartesianChart radCartesianChart = Find.

Regards,

Peter

Elena
Telerik team
 answered on 06 Apr 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?