List of usage examples for org.openqa.selenium NoSuchFrameException NoSuchFrameException
public NoSuchFrameException(String reason, Throwable cause)
From source file:org.uiautomation.ios.server.command.web.SetFrameHandler.java
License:Apache License
private RemoteWebElement getIframe(String id) throws Exception { RemoteWebElement currentDocument = getSession().getRemoteWebDriver().getDocument(); String selector = "iframe[name='" + id + "'],iframe[id='" + id + "'],frame[name='" + id + "'],frame[id='" + id + "']"; try {/*from www .ja v a2s . c om*/ RemoteWebElement frame = currentDocument.findElementByCSSSelector(selector); return frame; } catch (NoSuchElementException e) { throw new NoSuchFrameException(e.getMessage(), e); } // string|number|null|WebElement JSON Object }