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

Inconsistent Click results

1 Answer 65 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Al asked on 04 Feb 2015, 08:33 PM
We're using RadGridView and the 2nd column contains a button labeled Edit (on all rows).

In a test I need to click the button in the first row in different steps - but I'm getting inconsistent results.

When I highlight the link in Test Studio and go the Element and Edit in Live - it highlights the correct control (see attached screenshot).

IN our test, the If statement (which allows me to specify row 1, column 2) works all the time and the first click on line 3 always works fine, but sometimes the click on line 7 fails and sometimes the click on line 11 fails.  The click on line 16 never seems to fail (when we get that far) and the click on line 19 always seems to fail. (see snippet below)

All the click lines after 3 were copy and paste, then I did an Edit in Live, navigated to the control set the title and tagindex and selected all instances where control was called-out in the test.  This alternate method did not make a difference.

How can I make the click on the first button in the grid consistent?


(snippet from code with line numbers for reference)
 1. IF (RadGridDataCell('ctl00_contentPlaceHolderMain_detailView_gridView_radListItems_ctl00__0'): cell [1,2] text 'Contains' '!AT Test Survey'.)
 2.   Comment: survey record is there - edit it
 3.   Click 'ContentPlaceHolderMainDetailViewGridViewRadListItemsLbtEditItemLink'
 4.   Tab('ctl00_contentPlaceHolderMain_detailView_editView_radTabStrip'): 'Survey Rounds' click action.
 5.   Check 'ContentPlaceHolderMainDetailViewEditViewCtrUserControl2CtrlSurveyRoundsRblSetRounds1Radio' to be 'True'
 6.   Enter text '3' in 'ContentPlaceHolderMainDetailViewEditViewCtrUserControl2CtrlSurveyRoundsTbMaxRoundText'
 7.   Comment: save at this point because the test runner does not handle clicking out of the field as an action item
 8.   Click 'ContentPlaceHolderMainDetailViewCmdButtonsRptCommandButtonBtnCommandButtonSubmit'
 9.   Verify 'TextContent' 'Contains' 'Record saved successfully.' on 'ContentPlaceHolderMainDetailViewLblMessageSpan'
10.   Comment: re-edit the record - now the input fields will exist
11.   Click 'ContentPlaceHolderMainDetailViewGridViewRadListItemsLbtEditItemLink'
12.   Tab('ctl00_contentPlaceHolderMain_detailView_editView_radTabStrip'): 'Survey Rounds' click action.
13.   Enter text '12:00 AM' in 'ContentPlaceHolderMainDetailViewEditViewCtrUserControl2CtrlSurveyRoundsTimepicker1DateInputText'
14.   Enter text '12:00 PM' in 'ContentPlaceHolderMainDetailViewEditViewCtrUserControl2CtrlSurveyRoundsTimepicker3DateInputText'
15.   Comment: save again - we'll come back to verify
16.   Click 'ContentPlaceHolderMainDetailViewCmdButtonsRptCommandButtonBtnCommandButtonSubmit'
17.   Verify 'TextContent' 'Contains' 'Record saved successfully.' on 'ContentPlaceHolderMainDetailViewLblMessageSpan'
18.   Comment: go back in to verify the record really saved
19.   Click 'ContentPlaceHolderMainDetailViewGridViewRadListItemsLbtEditItemLink'
20.   Tab('ctl00_contentPlaceHolderMain_detailView_editView_radTabStrip'): 'Survey Rounds' click action.
21.   RadInput('ctl00_contentPlaceHolderMain_detailView_editView_ctrUserControl_2_ctrlSurveyRounds__timepicker1_dateInput_wrapper'): value 'Exact' '12:00 AM'.
22.   RadInput('ctl00_contentPlaceHolderMain_detailView_editView_ctrUserControl_2_ctrlSurveyRounds__timepicker2_dateInput_wrapper'): input is 'Empty'.
23.   RadInput('ctl00_contentPlaceHolderMain_detailView_editView_ctrUserControl_2_ctrlSurveyRounds__timepicker3_dateInput_wrapper'): value 'Exact' '12:00 PM'.
24. ELSE

1 Answer, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 09 Feb 2015, 02:35 PM
Hello Al,

Since you are experiencing sporadic behavior with the clicks I guess this is due because of timing issues. It would be useful if you add some wait for exist steps. It would be nice if you provide me with the application log upon failure so I can see the exact message that the test is failing with.

The best way to proceed here will be to grant access to the tested application so we can play around and investigate the behavior.

Please note that this is a public post and you should not disclose sensitive information. You may need to open a support ticket instead.

Regards,
Ivaylo
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Al
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Share this question
or