List of usage examples for org.openqa.selenium InvalidSelectorException InvalidSelectorException
public InvalidSelectorException(String reason, Throwable cause)
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); } }