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

com.epam.healenium.mapper.by.ByAllOrByChainedMapper Maven / Gradle / Ivy

The newest version!
package com.epam.healenium.mapper.by;

import org.openqa.selenium.By;

import java.util.function.Function;

public class ByAllOrByChainedMapper implements Function {

    @Override
    public String[] apply(By by) {
        String[] locatorParts = new String[2];
        int endType = by.toString().indexOf("(");
        locatorParts[0] = by.toString().substring(0, endType);
        locatorParts[1] = by.toString().substring(endType + 2, by.toString().length() - 2);
        return locatorParts;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy