Example usage for org.openqa.selenium InvalidSelectorException InvalidSelectorException

List of usage examples for org.openqa.selenium InvalidSelectorException InvalidSelectorException

Introduction

In this page you can find the example usage for org.openqa.selenium InvalidSelectorException InvalidSelectorException.

Prototype

public InvalidSelectorException(String reason, Throwable cause) 

Source Link

Usage

From source file:org.uiautomation.ios.UIAModels.predicate.CompositionType.java

License:Apache License

@SuppressWarnings("unchecked")
public Class<? extends ComposedCriteria> getAssociatedClass() {
    String pack = this.getDeclaringClass().getPackage().getName();
    String camel = this.toString().substring(0, 1).toUpperCase() + this.toString().substring(1).toLowerCase();
    String clazz = pack + "." + camel + "Criteria";
    try {/*from  ww  w .j  a  v a  2 s.co m*/
        return (Class<? extends ComposedCriteria>) Class.forName(clazz);
    } catch (ClassNotFoundException e) {
        throw new InvalidSelectorException(clazz + " isn't a valid class.", e);
    }
}