Telerik Forums
Testing Framework Forum
1 answer
102 views
Hello

I've created very basic WPF application called SampleAppPlus. Its purpose it to demonstrate Telerik Testing Framework. From MainWindow new WPF window gets opened and user can type text in it. First time window is opened and framework is attached to it. The window is closed by tests. Second time window is opened framework cannot attach to it although it is there . Error is that window doesn't exists. The strange thing is this happens ONLY when test is being debugged with VS. When you just run it it works.

Steps to reproduce:
1. Download: https://github.com/llatinov/SampleAppPlus
2. Make SampleAppPlus.Tests start up project.
3. Go to AddEditTextTests and put breakpoint on line 35.
4. Go to BaseTest.cs and change "applicationPath" location.
5. Debug the application. On line 22 in AddEditTextTests Add Text window is found. On line 35 window is not found.

Regards, Lyudmil
Ivaylo
Telerik team
 answered on 12 Mar 2015
1 answer
32 views
We have designed a page with RadHtmlPlaceholder. But now, we wish to test this in our UI suite using WebAii.
I have installed the latest WebAii, but am unable to locate the class which contains RadHtmlPlaceholder within WebAii for testing.
Without using RadHtmlPlaceholder properties, I am unable to perform any actions (click, scroll etc.) on the HTML elements within.
Could you please let me know which class in WebAii contains RadHtmlPlaceholder?
And also, direct me to the exact link in the WebAii API documentation which contains RadHtmlPlaceholder?
Cody
Telerik team
 answered on 11 Mar 2015
8 answers
1.4K+ views
Occasionally when testing with Chrome as the browse, I get this exception when it tries to launch the browser:

There was no endpoint listening at net.pipe://localhost/Telerik/TestingFramework.Hosts.Manager that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Here's the inner exception:

The pipe endpoint 'net.pipe://localhost/Telerik/TestingFramework.Hosts.Manager' could not be found on your local machine.

Rerunning the test alleviates the problem, so it's not an issue of the manager not being found...
Boyan Boev
Telerik team
 answered on 10 Mar 2015
8 answers
2.4K+ views

try to take textcontent or innertext from multiline element.

<td>

123

<br>

321

</td>

textcontent return 123321 but selenium return 123\r\n321

Ivaylo
Telerik team
 answered on 09 Mar 2015
7 answers
175 views
I have a RadGrid which is always 5 rows of data.
I want to edit each cell. I accept the changes when the whole page is saved.
I want a test script to to test the Save Button so I need to edit the radgrid contents. I have taken my code from your sample in the forum
My test code is  (Note macros to find the elements/cells):
The line "HtmlInputText inputBox = cellToEdit.Find.ByTagIndex<HtmlInputText>("input", 0);" returns a null value.

How do I get hold of the cell details so that I can edit the vale?

private void ChangeLocationDetails()
{
    RadGrid bumpGrid = Find.ById<RadGrid>(BUMP_LOCATION_GRID);
    GridTableView masterTable = bumpGrid.MasterTable;
 
    int[] cellList = { BUMP_LOCATION_XPOSITION_CELL, BUMP_LOCATION_YPOSITION_CELL, BUMP_LOCATION_BZ_CELL, BUMP_LOCATION_FIELD_OF_VIEW_CELL, BUMP_LOCATION_PHI_CELL, BUMP_LOCATION_THETA_CELL };
    for (int i = 0; i < masterTable.DataItems.Count; i++)
    {
        float seed = 0.01F;
        foreach (int j in cellList)
        {
            HtmlTableRow rowToEdit = bumpGrid.MasterTable.Rows[i];
 
            // Locate the cell to be updated
            HtmlTableCell cellToEdit = bumpGrid.MasterTable.Rows[i].Cells[j];
            // Put the cell in edit mode by a mouse click
            cellToEdit.MouseClick(MouseClickType.LeftDoubleClick);
 
            m_Logger.Debug("TestBasicSetupRecipe:ChangeLocationDetails:bumpGrid.MasterTable.EditedItems.Count=" + bumpGrid.MasterTable.EditedItems.Count.ToString());
 
            // Locate the <input> element that is added when the cell enters edit mode
            HtmlInputText inputBox = cellToEdit.Find.ByTagIndex<HtmlInputText>("input", 0); //<== This returns NULL
 
            // Give it a new value
            Actions.SetText(inputBox, (i + seed).ToString());
 
            seed += 0.1F;
        }
    }
 
}

              
<telerik:RadGrid ID="BumpLocationGrid" runat="server" AutoGenerateColumns="False" AllowAutomaticUpdates="True" OnBatchEditCommand="BumpLocationGrid_BatchEditCommand">
    <MasterTableView AutoGenerateColumns="False" EditMode="Batch" BatchEditingSettings-EditType="Row" BatchEditingSettings-OpenEditingEvent="Click" >
        <CommandItemSettings ShowAddNewRecordButton="False" />
        <RowIndicatorColumn Visible="False">
        </RowIndicatorColumn>
        <Columns>
            <telerik:GridNumericColumn DecimalDigits="0" HeaderText="Index" UniqueName="GUIIndex" DataField="GUIIndex" DataType="System.Int32" Visible="false">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridNumericColumn>
            <telerik:GridNumericColumn DecimalDigits="2" FilterControlAltText="Filter XPosition column" HeaderText="X Position (mm)" UniqueName="XPosition" DataField="x_coord" DataType="System.Double">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridNumericColumn>
            <telerik:GridNumericColumn DecimalDigits="2" FilterControlAltText="Filter YPosition column" HeaderText="Y Position (mm)" UniqueName="YPosition" DataField="y_coord" DataType="System.Double">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridNumericColumn>
            <telerik:GridNumericColumn DecimalDigits="2" FilterControlAltText="Filter Bz column" HeaderText="Bz" UniqueName="Bz" DataField="bz" DataType="System.Double">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridNumericColumn>
            <telerik:GridNumericColumn DecimalDigits="3" FilterControlAltText="Filter FOV column" HeaderText="Field Of View" UniqueName="FOV" DataField="field_of_view" DataType="System.Double">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridNumericColumn>
            <telerik:GridNumericColumn DecimalDigits="2" FilterControlAltText="Filter Phi column" HeaderText="Phi" UniqueName="Phi" DataField="phi" DataType="System.Double">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridNumericColumn>
            <telerik:GridNumericColumn DecimalDigits="2" FilterControlAltText="Filter Theta column" HeaderText="Theta" UniqueName="Theta" DataField="theta" DataType="System.Double">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text="" />
                </ColumnValidationSettings>
            </telerik:GridNumericColumn>
        </Columns>
 
        <BatchEditingSettings EditType="Row"></BatchEditingSettings>
    </MasterTableView>
</telerik:RadGrid>
Ivaylo
Telerik team
 answered on 06 Mar 2015
1 answer
105 views
Hello,

For quite long i am struggling with some strange behavior while using Telerik Testing Framework.

While executing test i can see that sometimes execution hangs (sometimes even up to 5 seconds) and than continue to proceed with steps.

I have observed this behavior in two examples:
 - While scrolling (using Down key) line by line in Grid.
 - While entering destination path in "Save As" dialog box (while entering i can see that execution stops in the middle of path.. and then sometimes finish path string or just close dialog box as it is)

This behavior is quite frustrating because most of the times it is breaking my test (it looks like execution omit some steps while it is in hanging state).

I really don't know where i should look resolution of this issue.
I was using IE 9, IE 10 and IE 11.. all of them had same problem.
I was using win 7 and win 8.1 ... so it seems not to be the OS issue.
Issue is happening while running test in DEBUG mode from VS, and while using TEST AGENT to run tests.
I am also using latest DLLS (2014.4.1411.0) but i was experimenting with some older builds (also without positive resolution).

Does anyone of you have seen this behavior?
Any idea where i can search what is causing it?

Regards,
MP
Ivaylo
Telerik team
 answered on 05 Mar 2015
26 answers
306 views
Hi,

Some time ago the download dialog handlers suddenly stopped working. Now the new version of framework is out, but they still don't work as expected.
Sometimes opening a file works, but when I want to save a file on a specific place, the passed pah is ignored and it's saved in default directory.

I attached a sample project.

Kind Regards
Silvio
Cody
Telerik team
 answered on 03 Mar 2015
4 answers
253 views
We're trying to simulate typing in a RadComboBox that allows custom text for our automated tests.

How can this be accomplished? Thanks.
Mbott
Top achievements
Rank 1
 answered on 27 Feb 2015
5 answers
226 views
I'm new to automated testing and have decided to try the Telerik tool. Here is what I have:
VS 2013
WPF application

I want to write some test scripts for testing WPF but the examples show a library that I need to reference, ArtOfTest.WebAii.Wpf. I can't find this library on my machine. I have searched the internet for it and still can't find it. Do I still need this .dll or has this been removed? Also, are there some good examples of WPF testing somewhere I can take a look at them?

Thanks.
Cody
Telerik team
 answered on 24 Feb 2015
9 answers
82 views
Below is some code that executes a jQuery function on a jstree control (see www.jstree.com for documentation on the jQuery control) - the jstree documentation says this function returns an array - I need WebAii to be able to return the array, or at least be able to parse the return from the jstree function, so it's more useful than the 'ToString()' that it calls on the returned object, which results in "System.__ComObject".  Set a breakpoint on the 'var foo' line, and inspect the value of foo to see what I mean.
[TestMethod]
public void jsTreeJive()
{
    Manager Manager = new ArtOfTest.WebAii.Core.Manager(false);
 
    Manager.Start();
 
    Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
 
    Browser Browser = Manager.ActiveBrowser;
 
    Browser.NavigateTo("http://www.jstree.com/docs/interaction/");
 
    var foo = Browser.Find.ById<HtmlDiv>("jstree1").AsjQueryControl().InvokejQueryFunction("jstree('get_selected', 'true');");
 
    Manager.Dispose();
}
Boyan Boev
Telerik team
 answered on 16 Feb 2015
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?