// Path: src/main/java/ru/colibri/ui/core/fields/IElement.java
// public interface IElement {
//     String getName();
// 
//     String getContentDesc();
// 
//     String getId();
// 
//     String getText();
// 
//     String getXpath();
// 
//     String getNSPredicate();
// 
//     boolean isSpecific();
// }
// 
// Path: src/main/java/ru/colibri/ui/core/finder/AbsFinder.java
// public abstract class AbsFinder<T extends AppiumDriver> implements IFinder {
//     protected abstract T getDriver();
// 
//     protected abstract DriversSettings getDriversSettings();
// 
//     @Override
//     public WebElement waitClickable(By by) {
//         Wait<WebDriver> wait = new WebDriverWait(getDriver(), getDriversSettings().getFindingTimeOutInSeconds());
//         return wait.until(ExpectedConditions.elementToBeClickable(by));
//     }
// 
//     @Override
//     public WebElement waitVisible(By by) {
//         Wait<WebDriver> wait = new WebDriverWait(getDriver(), getDriversSettings().getFindingTimeOutInSeconds());
//         return wait.until(ExpectedConditions.visibilityOfElementLocated(by));
//     }
// 
//     @Override
//     public WebElement findWebElement(By by) {
//         return getDriver().findElement(by);
//     }
// }
// 
// Path: src/main/java/ru/colibri/ui/core/settings/DriversSettings.java
// @Getter
// @Builder
// @ToString
// @EqualsAndHashCode
// public class DriversSettings {
//     private String appiumRemoteUrl;
//     private String deviceName;
//     private String filePath;
//     private int findingTimeOutInSeconds;
//     private int newCommandTimeoutInSeconds;
//     private int implicitlyWaitInSeconds;
//     private String storyTimeoutsInSeconds;
//     private List<String> stepsPackages;
//     private String storyPath;
//     private String storyToInclude;
//     private String storyToExclude;
//     private String pagesPath;
//     private String UDID;
//     private int wdaLocalPort;
//     private int systemPort;
//     private String platformVersion;
// }


import io.appium.java_client.android.AndroidDriver;
import org.apache.commons.lang3.StringUtils;
import org.openqa.selenium.WebElement;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import ru.colibri.ui.core.fields.IElement;
import ru.colibri.ui.core.finder.AbsFinder;
import ru.colibri.ui.core.settings.DriversSettings;
import java.util.List;
package ru.colibri.ui.settings.android;



@Component
@Qualifier("android")
public class AndroidFinder extends AbsFinder<AndroidDriver> {

    @Autowired
    protected AndroidByFactory byFactory;

    @Autowired(required = false)
    @Qualifier("android")
    private AndroidDriver driver;

    @Autowired(required = false)
    @Qualifier("android")
    private DriversSettings driversSettings;


    @Override
    public WebElement findWebElement(IElement element) {
        return getDriver().findElement(byFactory.byElement(element));
    }

    @Override
    public List<WebElement> findWebElements(IElement element) {
        return getDriver().findElements(byFactory.byElement(element));
    }

    @Override
    public WebElement findNestedWebElement(IElement parent, IElement nested) {
        //driver.findElement(By)
        return getDriver().findElement(byFactory.getNestedElement(parent, nested));
    }

// Path: src/main/java/ru/colibri/ui/core/fields/IElement.java
// public interface IElement {
//     String getName();
// 
//     String getContentDesc();
// 
//     String getId();
// 
//     String getText();
// 
//     String getXpath();
// 
//     String getNSPredicate();
// 
//     boolean isSpecific();
// }
// 
// Path: src/main/java/ru/colibri/ui/core/finder/AbsFinder.java
// public abstract class AbsFinder<T extends AppiumDriver> implements IFinder {
//     protected abstract T getDriver();
// 
//     protected abstract DriversSettings getDriversSettings();
// 
//     @Override
//     public WebElement waitClickable(By by) {
//         Wait<WebDriver> wait = new WebDriverWait(getDriver(), getDriversSettings().getFindingTimeOutInSeconds());
//         return wait.until(ExpectedConditions.elementToBeClickable(by));
//     }
// 
//     @Override
//     public WebElement waitVisible(By by) {
//         Wait<WebDriver> wait = new WebDriverWait(getDriver(), getDriversSettings().getFindingTimeOutInSeconds());
//         return wait.until(ExpectedConditions.visibilityOfElementLocated(by));
//     }
// 
//     @Override
//     public WebElement findWebElement(By by) {
//         return getDriver().findElement(by);
//     }
// }
// 
// Path: src/main/java/ru/colibri/ui/core/settings/DriversSettings.java
// @Getter
// @Builder
// @ToString
// @EqualsAndHashCode
// public class DriversSettings {
//     private String appiumRemoteUrl;
//     private String deviceName;
//     private String filePath;
//     private int findingTimeOutInSeconds;
//     private int newCommandTimeoutInSeconds;
//     private int implicitlyWaitInSeconds;
//     private String storyTimeoutsInSeconds;
//     private List<String> stepsPackages;
//     private String storyPath;
//     private String storyToInclude;
//     private String storyToExclude;
//     private String pagesPath;
//     private String UDID;
//     private int wdaLocalPort;
//     private int systemPort;
//     private String platformVersion;
// }


// Path: src/main/java/ru/colibri/ui/settings/android/AndroidFinder.java
import io.appium.java_client.android.AndroidDriver;
import org.apache.commons.lang3.StringUtils;
import org.openqa.selenium.WebElement;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import ru.colibri.ui.core.fields.IElement;
import ru.colibri.ui.core.finder.AbsFinder;
import ru.colibri.ui.core.settings.DriversSettings;
import java.util.List;

package ru.colibri.ui.settings.android;



@Component
@Qualifier("android")
public class AndroidFinder extends AbsFinder<AndroidDriver> {

    @Autowired
    protected AndroidByFactory byFactory;

    @Autowired(required = false)
    @Qualifier("android")
    private AndroidDriver driver;

    @Autowired(required = false)
    @Qualifier("android")
    private DriversSettings driversSettings;


    @Override
    public WebElement findWebElement(IElement element) {
        return getDriver().findElement(byFactory.byElement(element));
    }

    @Override
    public List<WebElement> findWebElements(IElement element) {
        return getDriver().findElements(byFactory.byElement(element));
    }

    @Override
    public WebElement findNestedWebElement(IElement parent, IElement nested) {
        //driver.findElement(By)
        return getDriver().findElement(byFactory.getNestedElement(parent, nested));
    }

    @Override