testCreatorInvokeMethod method

dynamic testCreatorInvokeMethod(
  1. String methodName,
  2. List positionalArguments, [
  3. Map<Symbol, dynamic>? namedArguments
])

(HTML only) Invoke a getter or a method.

Implementation

dynamic testCreatorInvokeMethod(
    String methodName, List<dynamic> positionalArguments,
    [Map<Symbol, dynamic>? namedArguments]) {
  if (methodName == 'id') {
    return id;
  }
  if (methodName == 'innerText') {
    return innerText;
  }
  if (methodName == 'visibleText') {
    return visibleText;
  }
  if (methodName == 'name') {
    return name;
  }
  if (methodName == 'displayed') {
    return displayed;
  }
  if (methodName == 'classes') {
    return classes;
  }
  if (methodName == 'isFocused') {
    return isFocused;
  }
  if (methodName == 'exists') {
    return exists;
  }
  if (methodName == 'offset') {
    return offset;
  }
  if (methodName == 'shadowRoot') {
    return shadowRoot;
  }
  if (methodName == 'getElementsByCss') {
    return Function.apply(
        getElementsByCss, positionalArguments, namedArguments);
  }
  if (methodName == 'byTag') {
    return Function.apply(byTag, positionalArguments, namedArguments);
  }
  if (methodName == 'clear') {
    return Function.apply(clear, positionalArguments, namedArguments);
  }
  if (methodName == 'click') {
    return Function.apply(click, positionalArguments, namedArguments);
  }
  if (methodName == 'clickOutside') {
    return Function.apply(clickOutside, positionalArguments, namedArguments);
  }
  if (methodName == 'scroll') {
    return Function.apply(scroll, positionalArguments, namedArguments);
  }
  if (methodName == 'scrollIntoView') {
    return Function.apply(
        scrollIntoView, positionalArguments, namedArguments);
  }
  if (methodName == 'type') {
    return Function.apply(type, positionalArguments, namedArguments);
  }
  if (methodName == 'typeSequence') {
    return Function.apply(typeSequence, positionalArguments, namedArguments);
  }
  if (methodName == 'focus') {
    return Function.apply(focus, positionalArguments, namedArguments);
  }
  if (methodName == 'blur') {
    return Function.apply(blur, positionalArguments, namedArguments);
  }
  if (methodName == 'toString') {
    return Function.apply(toString, positionalArguments, namedArguments);
  }
  throw 'METHOD NOT FOUND';
}