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
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