Good morning people,
I’m trying to do the following, I’m passing an Array of IDs to a KeyWord class and performing a for to check if the text “This field is required” is present in the component, but I’m not sure if I’m doing it right, could they help me ?
The difficulty is to get dynamic id and check if the message is for that field whose id is being passed
@Keyword
public String required(ArrayList inputs){
boolean retorno = true
for(int i = 0; i < inputs.size(); i++){
target = WebUI.verifyElementText(findTestObject(‘teste/small_Este campo obrigatrio’, [‘(data-bv-for)’ : inputs[i].toString()]), ‘Este campo é obrigatório!’)
// He is not coming here.
System.out.println(‘Hereeeeeeeeeeeeeeeeeeeeee’)
if(target == false){
retorno = false
}
}
return retorno
}