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

com.codeborne.selenide.appium.AppiumElementCommunicator Maven / Gradle / Ivy

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

import com.codeborne.selenide.Driver;
import com.codeborne.selenide.impl.WebElementCommunicator;
import io.appium.java_client.AppiumDriver;
import org.openqa.selenium.WebElement;

import javax.annotation.ParametersAreNonnullByDefault;
import java.util.List;

import static com.codeborne.selenide.appium.WebdriverUnwrapper.instanceOf;

@ParametersAreNonnullByDefault
public class AppiumElementCommunicator extends WebElementCommunicator {

  @Override
  public List texts(Driver driver, List elements) {
    if (instanceOf(driver, AppiumDriver.class)) {
      return textsOneByOne(elements);
    }
    return super.texts(driver, elements);
  }

  @Override
  public List attributes(Driver driver, List elements, String attributeName) {
    if (instanceOf(driver, AppiumDriver.class)) {
      return attributesOneByOne(elements, attributeName);
    }
    return super.attributes(driver, elements, attributeName);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy