pkudrys
16 days agoFrequent Contributor
getting "FindAll is not a function" error
Hi folks,
Any idea why I'm getting error "FindAll is not a function"? Below code successfully returns parentElement object, But when I try to call FindAll with the obtained object, it fails with the above error.
The interesting point is, that if I call FindAll directly on inputElement object, it works OK. There seems to be a problem only with the parentElement-based object. Do I need to somehow convert the localParent before calling FindAll?
...
else if (inputElement.className.includes('mat-mdc-chip-input'))
{
var localParent = inputElement.parentElement;
var getAllChips = localParent.FindAll("tagName","mat-chip-row",10);
for (let j = 0; j<=getAllChips.length - 1; j++)
{
getAllChips[j].FindElement("//mat-chip-row//*[contains(@class,'mat-mdc-chip-remove')]/parent::span").Click();
}
}
...