Example usage for org.openqa.selenium.remote DriverCommand FIND_CHILD_ELEMENT

List of usage examples for org.openqa.selenium.remote DriverCommand FIND_CHILD_ELEMENT

Introduction

In this page you can find the example usage for org.openqa.selenium.remote DriverCommand FIND_CHILD_ELEMENT.

Prototype

String FIND_CHILD_ELEMENT

To view the source code for org.openqa.selenium.remote DriverCommand FIND_CHILD_ELEMENT.

Click Source Link

Usage

From source file:qaf.example.listener.IosLocatorCompatibilityListener.java

License:Open Source License

@Override
public void beforeCommand(QAFExtendedWebDriver driver, CommandTracker commandTracker) {
    if (commandTracker.getCommand().equalsIgnoreCase(DriverCommand.FIND_ELEMENT)
            || commandTracker.getCommand().equalsIgnoreCase(DriverCommand.FIND_ELEMENTS)
            || commandTracker.getCommand().equalsIgnoreCase(DriverCommand.FIND_CHILD_ELEMENT)
            || commandTracker.getCommand().equalsIgnoreCase(DriverCommand.FIND_CHILD_ELEMENTS)) {

        String version = driver.getCapabilities().getVersion();
        if (is9OrBelow(version)) {
            ensureIos9Compatibility(commandTracker.getParameters());
        } else {/*from   w ww.  j ava2  s . com*/
            ensureIos11Compatibility(commandTracker.getParameters());
        }
    }
}