Hi, update on test results
I the test is not no longer passing due to the Radio button not being checked/tapped
I have tried both mobile.tap and mobile.checkelement for some reason the mobile.tap gives a higher percentage of radio buttons actually being checked.
When executing the test the scrolltotext works however the tap or check radio button does not always work, and gives different results (as in which buttons are checked) each time the test is run.
I tried verifyelementchecked but this did not result in any of the unchecked radio buttons being checked so have tried the getattribute have no idea if this is working or not, but getting a higher rate of checks.
I am new and I do not know where to turn next to ensure that a radio button is selected at each question (which is represented in the script below by the ScrolltoText)
‘’'WebUI.callTestCase(findTestCase(‘AA_Reusables/Android_Startup_Logon’), [:], FailureHandling.STOP_ON_FAILURE)
WebUI.callTestCase(findTestCase(‘AA_Resuseable_Test_Steps/Android_Forms_Open_CandidateAssessment’), [:], FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Forms/android.widget.CheckBox - History’), 0)
Mobile.tap(findTestObject(‘Mobile_Android/Forms/android.widget.CheckBox - Clinical Judgement’), 0)
//Q4
Mobile.scrollToText(‘4. Communicates well with patients’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 10, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 10, FailureHandling.STOP_ON_FAILURE)
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
Mobile.verifyElementChecked(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 10)
//Q5
Mobile.scrollToText(‘5. Reaches the correct diagnosis in a timely manner’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘6. Refers patients appropriately’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q6
Mobile.scrollToText(‘6. Refers patients appropriately’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘7. Provides appropriate information for colleagues to provide follow-up patient care’)
// If radiobutton is checked
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q7
Mobile.scrollToText(‘7. Provides appropriate information for colleagues to provide follow-up patient care’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘8. Accepts responsibility for care of ongoing issues’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q8
Mobile.scrollToText(‘8. Accepts responsibility for care of ongoing issues’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘9. Provides pertinent and timely information about patients when required’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q9
Mobile.scrollToText(‘9. Provides pertinent and timely information about patients when required’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘10. Recognises and takes action when urgent intervention is required’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q10
Mobile.scrollToText(‘10. Recognises and takes action when urgent intervention is required’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘11. Takes responsibility for actions and decisions’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q11
Mobile.scrollToText(‘11. Takes responsibility for actions and decisions’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘12. Demonstrates apprioriate clinical judgement’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q12
Mobile.scrollToText(‘12. Demonstrates apprioriate clinical judgement’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘13. Maintains patient confidentiality’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q13
Mobile.scrollToText(‘13. Maintains patient confidentiality’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘14. Works well with collegues’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q14
Mobile.scrollToText(‘14. Works well with collegues’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘15. Speaks respectfully of collegues in converrsations with patients and co-workers’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q15
Mobile.scrollToText(‘15. Speaks respectfully of collegues in converrsations with patients and co-workers’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘16. Documents care appropriately’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q16
Mobile.scrollToText(‘16. Documents care appropriately’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘17. Is willing to take responsibility for error’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q17
Mobile.scrollToText(‘17. Is willing to take responsibility for error’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘18. Contributes to administrative practices supporting good medical care (office protocols, timely reports / information flow’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q18
Mobile.scrollToText(‘18. Contributes to administrative practices supporting good medical care (office protocols, timely reports / information flow’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘19. Writes prescriptions and orders clearly’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q19
Mobile.scrollToText(‘19. Writes prescriptions and orders clearly’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘20. Appears committed to and current with advances in medical education’) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
//Q20
Mobile.scrollToText(‘20. Appears committed to and current with advances in medical education’)
Mobile.waitForElementPresent(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15, FailureHandling.STOP_ON_FAILURE)
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
checkedAttribute = Mobile.getAttribute(findTestObject(‘Object Repository/Android_MSFMEDCOLL/Ninas_RadioButton_Any’), ‘checked’,
15)
if (checkedAttribute == ‘true’) {
Mobile.scrollToText(‘Global rating’, FailureHandling.STOP_ON_FAILURE) // If radiobutton is checked
// Handle the failure or add additional steps here
} else {
Mobile.tap(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
}
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
Mobile.scrollToText(‘Global rating’, FailureHandling.STOP_ON_FAILURE)
Mobile.checkElement(findTestObject(‘Mobile_Android/Forms/FinaliseForm/android.widget.RadioButton - Competent’), 10)
Mobile.verifyElementChecked(findTestObject(‘Android_MSFMEDCOLL/Ninas_RadioButton_Any’), 15)
Mobile.scrollToText(‘Assessor comments’, FailureHandling.CONTINUE_ON_FAILURE)
Mobile.waitForElementPresent(findTestObject(‘Mobile_Android/Forms/FinaliseForm/android.widget.AssessorComments_EditTextbox’),
10)
Mobile.setText(findTestObject(‘Mobile_Android/Forms/FinaliseForm/android.widget.AssessorComments_EditTextbox’), ‘This candidate Passes’,
10)
Mobile.setText(findTestObject(‘Mobile_Android/Forms/FinaliseForm/android.view.View - 23. Feedback time’), ‘10.00’, 10)
Mobile.setText(findTestObject(‘Mobile_Android/Forms/FinaliseForm/android.view.View - 24. Observation time’), ‘9.00’, 10)
Mobile.tap(findTestObject(‘Mobile_Android/Forms/FinaliseForm/android.widget.Button - Continue’), 10)
Mobile.delay(3, FailureHandling.STOP_ON_FAILURE)
Mobile.longPress(findTestObject(‘Mobile_Android/Forms/FinaliseForm/android.widget.ImageLongPress’), 10, FailureHandling.STOP_ON_FAILURE)‘’’