Windows radiobutton IsSelected

Need if IsSelected or not

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testng.keyword.TestNGBuiltinKeywords as TestNGKW
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys

Windows.startApplicationWithTitle(‘D:\Work\Debug\Start.exe’, ‘Start.exe’)

Windows.getAttribute(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsSelected’)

’Tab Online Activation -> RadioButton: Network license ->IsEnabled’
Windows.verifyElementAttributeValue(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsSelected’, **
** ‘True’, 4, FailureHandling.CONTINUE_ON_FAILURE)

Windows.verifyElementAttributeValue(findWindowsObject(‘Onlice_Activation/RadioButton’), ‘Name’, ‘Network license:’, 4, FailureHandling.CONTINUE_ON_FAILURE)

Windows.getAttribute(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘Name’)

Windows.verifyElementAttributeValue(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘Name’, ‘Network license:’,
4, FailureHandling.CONTINUE_ON_FAILURE)

Windows.getAttribute(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsPassword’)

Windows.verifyElementAttributeValue(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsPassword’,
‘False’, 4, FailureHandling.CONTINUE_ON_FAILURE)

Windows.getAttribute(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘ClassName’)

Windows.verifyElementAttributeValue(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘ClassName’, ‘WindowsForms10.BUTTON.app.0.30d38e8_r6_ad1’,
4, FailureHandling.CONTINUE_ON_FAILURE)

Windows.getAttribute(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsKeyboardFocusable’)

Windows.verifyElementAttributeValue(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsKeyboardFocusable’,
‘True’, 4, FailureHandling.CONTINUE_ON_FAILURE)

Windows.getAttribute(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsOffscreen’)

Windows.verifyElementAttributeValue(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsOffscreen’,
‘False’, 4, FailureHandling.CONTINUE_ON_FAILURE)

Windows.getAttribute(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsEnabled’)

Windows.verifyElementAttributeValue(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsEnabled’, ‘True’,
4, FailureHandling.CONTINUE_ON_FAILURE)

Windows.getAttribute(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘HasKeyboardFocus’)

Windows.verifyElementAttributeValue(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘HasKeyboardFocus’,
‘False’, 4, FailureHandling.CONTINUE_ON_FAILURE)

Windows.getAttribute(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsContentElement’)

Windows.verifyElementAttributeValue(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsContentElement’,
‘True’, 4, FailureHandling.CONTINUE_ON_FAILURE)

Windows.getAttribute(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsAvailable’)

Windows.verifyElementAttributeValue(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsAvailable’,
‘True’, 4, FailureHandling.CONTINUE_ON_FAILURE)

Windows.getAttribute(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsControlElement’)

Windows.verifyElementAttributeValue(findWindowsObject(‘Object Repository/Onlice_Activation/RadioButton’), ‘IsControlElement’,
‘True’, 4, FailureHandling.CONTINUE_ON_FAILURE)

Windows.closeApplication()

Element1 (Need Help)

04-27-2021 01:28:59 PM verifyElementAttributeValue(findWindowsObject(“Object Repository/Onlice_Activation/RadioButton”), “IsSelected”, “True”, 4, CONTINUE_ON_FAILURE)

Elapsed time: 0.373s

Object ‘Object Repository/Onlice_Activation/RadioButton’ has attribute ‘IsSelected’ with actual value ‘null’ instead of expected value ‘True’

Hi @b.horvath,

For the “IsSelected” attribute, you can use “SelectionItem.IsSelected” instead.

References: https://github.com/microsoft/WinAppDriver/blob/master/Tests/WebDriverAPI/ElementAttribute.cs