WebElement canpassStatus = Windows.findElement(findWindowsObject(‘Object Repository/Itinerary Tab/Service Status/CanPass Gendec/canpass_status_CFM’))
String canpassStsTxt = canpassStatus.getAttribute(“Value”)
I’m getting “Null” value
WebElement canpassStatus = Windows.findElement(findWindowsObject(‘Object Repository/Itinerary Tab/Service Status/CanPass Gendec/canpass_status_CFM’))
String canpassStsTxt = canpassStatus.getAttribute(“Value”)
I’m getting “Null” value
Hi,
I am also facing the same issue.
Any update on this?
Even i tried “Value.Value” still i am getting the null value only.
Thanks,
Swathi
Thanks,
Swathi
Hi. I have the same issue here. I tried to get ToggleState property of a checkbox but it returns null. Any update on this? Thank you.
Hi
I am getting error message after executing my Katalon Studio script. Please provide your input for the error message.
In below script
def value = Windows.getAttribute(‘CancelTermination_Contract/TerminateContract_CheckBox’,‘IsEnabled’, FailureHandling.STOP_ON_FAILURE)
System.out.println(value)
Below is Test Run Error Report
Error MSG:
groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords.getAttribute() is applicable for argument types: (java.lang.String, java.lang.String) values:
“…”
Possible solutions: getAttribute(com.kms.katalon.core.testobject.WindowsTestObject, java.lang.String), getAttribute(com.kms.katalon.core.testobject.WindowsTestObject, java.lang.String, com.kms.katalon.core.model.FailureHandling)
In case anyone is still stuck with this issue, here is the solution I found:
'Define your checkbox object'
def obj = findWindowsObject('Object Repository/...')
'Determines if the checkbox is toggled/checked'
if ( Windows.getAttribute( obj, 'Toggle.ToggleState' ) == '1' ) {
// Your code here
}
If you want to know if a checkbox has been toggled or not, you need to retrieve the “Toggle.ToggleState” attribute. This will return one of three options: