All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codeborne.selenide.appium.commands.AppiumVal Maven / Gradle / Ivy

There is a newer version: 7.5.1
Show newest version
package com.codeborne.selenide.appium.commands;

import com.codeborne.selenide.SelenideElement;
import com.codeborne.selenide.commands.GetValue;
import com.codeborne.selenide.commands.Val;
import com.codeborne.selenide.impl.WebElementSource;
import org.jspecify.annotations.Nullable;

public class AppiumVal extends Val {
  private final GetValue getValue = new GetValue();
  private final AppiumSetValue setValue = new AppiumSetValue();

  public AppiumVal() {
    super(new GetValue(), new AppiumSetValue());
  }

  @Override
  @Nullable
  public Object execute(SelenideElement proxy, WebElementSource locator, Object @Nullable [] args) {
    if (args == null || args.length == 0) {
      return getValue.execute(proxy, locator, NO_ARGS);
    }
    else {
      setValue.execute(proxy, locator, args);
      return proxy;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy