Verify that the value is empty

Good afternoon, I would like to know how to check if the combobox is empty (value = “”), and the field (combobox) has the property “disabled”, the same is to know if a field of type "textfield "is filled out.

Hello.
Try with the keyword “Get Attribute” set the combox as Object, the “Value” as Input and a variable as Output.
The variable will take the object value.
let me know if it work for you and I will check for a solution to the other questions.

Hello Luis!

Not being able to do what you told me, would you have the script so I can analyze how it can be done? I’m still new to the tool.

comboValue = WebUI.getAttribute(findTestObject(‘ComboBoxObject’), ‘value’)
println(comboValue)

You need to change the object example for your object of interest and then you will see the value for the combobox in the log viewer or the console if you need to do other validation for that value you can use the variable "comboValue " for example:

if (comboValue == ‘’)
{
println (‘The value of the comboBox CAN NOT BE EMPTY’);
err;
}

You can do the same if you want to know the property “disabled” of the combobox.

isDisabled = WebUI.getAttribute(findTestObject(‘ComboBoxObject’), ‘disabled’)

println(isDisabled);

The variable "isDisabled " will get the value “true” if the comboBox is disabled and “false” when is not, then you can use the variable as the other example:

if (isDisabled == ‘true’)
{
println (‘The comboBox is Disabled’);
}

let me know if it help you :slight_smile:

Good morning, sorry for the delay, a solution that you’re working, thank you!

Can you do the same thing for API response? Check if an element exists? I don’t see a method for that.

Hi l need a help. Can you help me dr