I was trying to figure out how to click on a div specified by the text of one
of it’s child’s inner text.
public class GetChildNodeFromList { @Keyword
def GetChildNode(TestObject to, int i) {
ListWebElements users = WebUiBuiltInKeywords.findWebElements(to, 30)
//println users
for (user in users) {
println user
ListWebElements children = WebUiBuiltInKeywords.findWebElements(TestObject user, 30)
//println children
}
}
}
the problem is that you I couldn’t get the children of user in users. is there a way to do that?
Hi Mark,
The root caused is a user is a WebElement, not a Katalon TestObject
To get children of a user, please try import com.kms.katalon.core.webui.common.WebUiCommonHelper List<WebElement> children = user.findElements(WebUiCommonHelper.buildLocator(put your children testobject here));