/** * Returns the response representing the main page in this window. */ public WebResponse getCurrentPage() { return getFrameContents( WebRequest.TOP_FRAME ); }
/** * Returns the response representing the main page in this window. */ public WebResponse getCurrentPage() { return getFrameContents( WebRequest.TOP_FRAME ); }
/** * Returns the response associated with the specified frame name in the main window. * Throws a runtime exception if no matching frame is defined. * * @since 1.6 **/ public WebResponse getFrameContents( FrameSelector targetFrame ) { return _mainWindow.getFrameContents( targetFrame ); }
/** * Returns the response representing the main page in this window. */ public WebResponse getCurrentPage() { return getFrameContents( WebRequest.TOP_FRAME ); }
/** * Returns the response associated with the specified frame name in the main window. * Throws a runtime exception if no matching frame is defined. * * @since 1.6 **/ public WebResponse getFrameContents( FrameSelector targetFrame ) { return _mainWindow.getFrameContents( targetFrame ); }
/** * Returns the response associated with the specified frame name in the main window. * Throws a runtime exception if no matching frame is defined. * * @since 1.6 **/ public WebResponse getFrameContents( FrameSelector targetFrame ) { return _mainWindow.getFrameContents( targetFrame ); }
/** * Returns the response associated with the specified frame name in the main window. * Throws a runtime exception if no matching frame is defined. **/ public WebResponse getFrameContents( String frameName ) { return _mainWindow.getFrameContents( frameName ); }
/** * Returns the response associated with the specified frame name in the main window. * Throws a runtime exception if no matching frame is defined. **/ public WebResponse getFrameContents( String frameName ) { return _mainWindow.getFrameContents( frameName ); }
/** * Returns the response associated with the specified frame name in the main window. * Throws a runtime exception if no matching frame is defined. **/ public WebResponse getFrameContents( String frameName ) { return _mainWindow.getFrameContents( frameName ); }
private WebResponse getCurrentFrame( WebWindow window, FrameSelector pageFrame ) { return window.hasFrame( pageFrame ) ? window.getFrameContents( pageFrame ) : window.getCurrentPage(); }
private WebResponse getCurrentFrame( WebWindow window, FrameSelector pageFrame ) { return window.hasFrame( pageFrame ) ? window.getFrameContents( pageFrame ) : window.getCurrentPage(); }
private WebResponse getCurrentFrame( WebWindow window, FrameSelector pageFrame ) { return window.hasFrame( pageFrame ) ? window.getFrameContents( pageFrame ) : window.getCurrentPage(); }
/** * Returns the value of the named property. Will return null if the property does not exist. **/ public Object get( String propertyName ) { if (propertyName.equals( "name" )) { return getName(); } else if (propertyName.equalsIgnoreCase( "top" )) { return _window.getFrameContents( WebRequest.TOP_FRAME ).getScriptableObject(); } else if (propertyName.equalsIgnoreCase( "parent" )) { return _window.getParentFrameContents( _frame ).getScriptableObject(); } else if (propertyName.equalsIgnoreCase( "opener" )) { return getFrameName().equals( WebRequest.TOP_FRAME ) ? getScriptable( _window.getOpener() ) : null; } else if (propertyName.equalsIgnoreCase( "closed" )) { return (getFrameName().equals( WebRequest.TOP_FRAME ) && _window.isClosed()) ? Boolean.TRUE : Boolean.FALSE; } else { try { return getSubframeContents( propertyName ).getScriptableObject(); } catch (NoSuchFrameException e) { return super.get( propertyName ); } } }
final WebResponse response = getSubframeResponse( request, requestContext ); requestContext.runScripts(); result = response == null ? null : response.getWindow().getFrameContents( response.getFrame() ); // javascript might replace the response in its frame } finally { if (null != request && request.equals(_initialRequest)) {
final WebResponse response = getSubframeResponse( request, requestContext ); requestContext.runScripts(); result = response == null ? null : response.getWindow().getFrameContents( response.getFrame() ); // javascript might replace the response in its frame } finally { if (null != request && request.equals(_initialRequest)) {
/** * Returns the value of the named property. Will return null if the property does not exist. **/ public Object get( String propertyName ) { if (propertyName.equals( "name" )) { return getName(); } else if (propertyName.equalsIgnoreCase( "top" )) { return _window.getFrameContents( WebRequest.TOP_FRAME ).getScriptableObject(); } else if (propertyName.equalsIgnoreCase( "parent" )) { return _window.getParentFrameContents( _frame ).getScriptableObject(); } else if (propertyName.equalsIgnoreCase( "opener" )) { return getFrameName().equals( WebRequest.TOP_FRAME ) ? getScriptable( _window.getOpener() ) : null; } else if (propertyName.equalsIgnoreCase( "closed" )) { return (getFrameName().equals( WebRequest.TOP_FRAME ) && _window.isClosed()) ? Boolean.TRUE : Boolean.FALSE; } else { try { return getSubframeContents( propertyName ).getScriptableObject(); } catch (NoSuchFrameException e) { return super.get( propertyName ); } } }
/** * Returns the value of the named property. Will return null if the property does not exist. **/ public Object get( String propertyName ) { if (propertyName.equals( "name" )) { return getName(); } else if (propertyName.equalsIgnoreCase( "top" )) { return _window.getFrameContents( WebRequest.TOP_FRAME ).getScriptableObject(); } else if (propertyName.equalsIgnoreCase( "parent" )) { return _window.getParentFrameContents( _frame ).getScriptableObject(); } else if (propertyName.equalsIgnoreCase( "opener" )) { return getFrameName().equals( WebRequest.TOP_FRAME ) ? getScriptable( _window.getOpener() ) : null; } else if (propertyName.equalsIgnoreCase( "closed" )) { return (getFrameName().equals( WebRequest.TOP_FRAME ) && _window.isClosed()) ? Boolean.TRUE : Boolean.FALSE; } else { try { return getSubframeContents( propertyName ).getScriptableObject(); } catch (NoSuchFrameException e) { return super.get( propertyName ); } } }
final WebResponse response = getSubframeResponse( request, requestContext ); requestContext.runScripts(); result = response == null ? null : response.getWindow().getFrameContents( response.getFrame() ); // javascript might replace the response in its frame } finally { if (null != request && request.equals(_initialRequest)) {