This is a migrated thread and some comments may be shown as answers.

CodedUITest fails on Telerik grid

3 Answers 90 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Celeste Zietsman
Top achievements
Rank 2
Celeste Zietsman asked on 17 Jul 2013, 01:41 PM
Hi

I am new to the visual studio CodedUITesting. I created a few automated tests, 2 of the tests passed and 1 test failed with the error specified in the codeduitest zip file. I don't understand what the error means and thus do not know how to fix it.

This is what my code looks like. I think it fails on the bold text because it does not type the text into the cell. Can anyone please help me out here, thank you.

<TestMethod()>
    Public Sub NewRole()
Me.UIMap.StartupApp_LoginToMain()
        Me.UIMap.OpenRoleForm()
        Me.UIMap.NewRole()
    End Sub

 '''<summary>
        '''StartupApp_LoginToMain - Use 'StartupApp_LoginToMainParams' to pass parameters into this method.
        '''</summary>
        Public Sub StartupApp_LoginToMain()
            Dim uIOpenComboBox As WinComboBox = Me.UIRunWindow.UIItemWindow.UIOpenComboBox
            Dim uIOKButton As WinButton = Me.UIRunWindow.UIOKWindow.UIOKButton
            Dim uISettingsButton As WinButton = Me.UILoginWindow.UISettingsWindow.UISettingsButton
            Dim uITxtServerEdit As WinEdit = Me.UIConnecttoadatabaseWindow.UICELESTEZPCSQLEXPRESSWindow.UITxtServerEdit
            Dim uITxtDataEdit As WinEdit = Me.UIConnecttoadatabaseWindow.UIIT3AGWindow.UITxtDataEdit
            Dim uIOKButton1 As WinButton = Me.UIConnecttoadatabaseWindow.UIOKWindow.UIOKButton
            Dim uIOKButton2 As WinButton = Me.UIConnectionStateWindow.UIOKWindow.UIOKButton
            Dim uITxtNameEdit As WinEdit = Me.UILoginWindow.UITxtNameWindow.UITxtNameEdit
            Dim uITxtPassEdit As WinEdit = Me.UILoginWindow.UITxtPassWindow.UITxtPassEdit
            Dim uIOKButton3 As WinButton = Me.UILoginWindow.UIOKWindow.UIOKButton

            'Press keyboard shortcut keys 'Windows + r'
            Keyboard.SendKeys(Me.StartupApp_LoginToMainParams.SendKeys, ModifierKeys.Windows)

            'Select 'c:\tfs\IT3\DEV\IT3\IT3C\bin\Debug\IT3C.exe' in 'Open:' combo box
            uIOpenComboBox.EditableItem = Me.StartupApp_LoginToMainParams.UIOpenComboBoxEditableItem

            'Click 'OK' button
            Mouse.Click(uIOKButton, New Point(23, 19))

            'Click '&Settings' button
            Mouse.Click(uISettingsButton, New Point(59, 14))

            'Type 'CELESTEZ-PC\SQLEXPRESS' in 'txtServer' text box
            uITxtServerEdit.Text = Me.StartupApp_LoginToMainParams.UITxtServerEditText

            'Type '{Tab}' in 'txtServer' text box
            Keyboard.SendKeys(uITxtServerEdit, Me.StartupApp_LoginToMainParams.UITxtServerEditSendKeys, ModifierKeys.None)

            'Type 'IT3AG' in 'txtData' text box
            uITxtDataEdit.Text = Me.StartupApp_LoginToMainParams.UITxtDataEditText

            'Click '&OK' button
            Mouse.Click(uIOKButton1, New Point(100, 18))

            'Click 'OK' button
            Mouse.Click(uIOKButton2, New Point(27, 12))

            'Type 'SuperU' in 'txtName' text box
            uITxtNameEdit.Text = Me.StartupApp_LoginToMainParams.UITxtNameEditText

            'Type '{Tab}' in 'txtName' text box
            Keyboard.SendKeys(uITxtNameEdit, Me.StartupApp_LoginToMainParams.UITxtNameEditSendKeys, ModifierKeys.None)

            'Type '********' in 'txtPass' text box
            Keyboard.SendKeys(uITxtPassEdit, Me.StartupApp_LoginToMainParams.UITxtPassEditSendKeys, true)

            'Click '&OK' button
            Mouse.Click(uIOKButton3, New Point(54, 18))
 End Sub

'''<summary>
        '''OpenRoleForm
        '''</summary>
        Public Sub OpenRoleForm()
            Dim uIItemTabPage As UITestControl = Me.UIIT3sMainMenuWindow.UIRibMainWindow.UIItemTabPage
            Dim uIItemButton As RadButtonTestControl = Me.UIIT3sMainMenuWindow.UIRibMainWindow.UIItemButton

            'Click tab
            Mouse.Click(uIItemTabPage, New Point(63, 9))

            'Click button numbered 6 in 'ribMain' window
            Mouse.Click(uIItemButton, New Point(22, 22))
        End Sub

  <GeneratedCode("Coded UITest Builder", "11.0.60315.1")>  _
    Partial Public Class UIMap
        
        '''<summary>
        '''NewRole - Use 'NewRoleParams' to pass parameters into this method.
        '''</summary>
        Public Sub NewRole()
            Dim uIItemButton As RadButtonTestControl = Me.UIRolesWindow.UIRadRibbonBar1Window.UIItemButton
            Dim uIRadGridView1Table2 As RadGridViewTestControl = Me.UIRolesWindow.UIRadGridView1Window.UIRadGridView1Table2
            Dim uIRadGridView1Table3 As RadGridViewTestControl = Me.UIRolesWindow.UIRadGridView1Window.UIRadGridView1Table3
            Dim uIItemEdit As WinEdit = Me.UIRolesWindow.UIRadGridView1Table4.UIItemWindow.UIItemEdit
            Dim uIRadGridView1Table4 As RadGridViewTestControl = Me.UIRolesWindow.UIRadGridView1Window.UIRadGridView1Table4
            Dim uIItemEdit1 As WinEdit = Me.UIRolesWindow.UIRadGridView1Table5.UIItem0Window.UIItemEdit
            Dim uIRadGridView1Table5 As RadGridViewTestControl = Me.UIRolesWindow.UIRadGridView1Window.UIRadGridView1Table5
            Dim uIItemButton1 As RadButtonTestControl = Me.UIRolesWindow.UIRadRibbonBar1Window.UIItemButton1
            Dim uIYesButton As WinButton = Me.UISaveWindow.UIYesWindow.UIYesButton

            'Click button numbered 2 in 'RadRibbonBar1' window
            Mouse.Click(uIItemButton, New Point(9, 23))

            'Click 'RadGridView1' table
            Mouse.Click(uIRadGridView1Table2, New Point(65, 188))

            'Click 'RadGridView1' table
            Mouse.Click(uIRadGridView1Table3, New Point(68, 181))

            'Type 'Admin' in text box
            uIItemEdit.Text = Me.NewRoleParams.UIItemEditText


            'Click 'RadGridView1' table
            Mouse.Click(uIRadGridView1Table4, New Point(183, 178))

            'Type '0' in text box
            uIItemEdit1.Text = Me.NewRoleParams.UIItemEditText1

            'Click 'RadGridView1' table
            Mouse.Click(uIRadGridView1Table5, New Point(248, 308))

            'Click button numbered 5 in 'RadRibbonBar1' window
            Mouse.Click(uIItemButton1, New Point(8, 17))

            'Click '&Yes' button
            Mouse.Click(uIYesButton, New Point(43, 13))
        End Sub


3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 17 Jul 2013, 02:12 PM
Hello Celeste,

I am sorry but this forum is dedicated to supporting Telerik Test Studio exclusively. As such we are not able to assist with any Microsoft Coded UI questions or problems.

Regards,
Cody
Telerik
We've released our first-ever public Test Studio BETA! Download the BETA, install it,
and send us your feedback! Expires mid-August!
0
Celeste Zietsman
Top achievements
Rank 2
answered on 17 Jul 2013, 02:23 PM
Hi Cody 

I understand that, I just assumed that the issue is with the Telerik grid. I will try and find out by microsoft if they can solve the issue

Thanks
0
Cody
Telerik team
answered on 17 Jul 2013, 04:30 PM
Hi,

Sorry I missed the part about it dealing with a Telerik RadGrid. You could try posting your question on the RadGrid forum since it's dedicated to our RadGrid control. That team may be able to help you with this.

Regards,
Cody
Telerik
We've released our first-ever public Test Studio BETA! Download the BETA, install it,
and send us your feedback! Expires mid-August!
Tags
General Discussions
Asked by
Celeste Zietsman
Top achievements
Rank 2
Answers by
Cody
Telerik team
Celeste Zietsman
Top achievements
Rank 2
Share this question
or