private WebImage toWebImage( Element child ) { return new WebImage( _response, this, _baseURL, (HTMLImageElement) child, _frame, _baseTarget, _characterSet ); }
/** * Returns the link which contains the first image with the specified text as its 'alt' attribute. **/ public WebLink getLinkWithImageText( String text ) { WebImage image = getImageWithAltText( text ); return image == null ? null : image.getLink(); }
public Object get( String propertyName ) { if (propertyName.equalsIgnoreCase( "src" )) { return getSource(); } else if(propertyName.equalsIgnoreCase( "name" )) { return getName(); } else { return super.get( propertyName ); } }
public String getName() { return WebImage.this.getID().length() != 0 ? WebImage.this.getID() : WebImage.this.getName(); }
/** * Returns the first image found in the page with the specified alt attribute. **/ public WebImage getImageWithAltText( String altText ) { WebImage[] images = getImages(); for (int i = 0; i < images.length; i++) { if (HttpUnitUtils.matches( altText, images[i].getAltText() )) return images[i]; } return null; }
public ScriptingHandler[] getImages() { WebImage[] images = HTMLPage.this.getImages(); ScriptingHandler[] result = new WebImage.Scriptable[ images.length ]; for (int i = 0; i < images.length; i++) { result[i] = images[i].getScriptingHandler(); } return result; }
public Object get( String propertyName ) { if (propertyName.equalsIgnoreCase( "src" )) { return getSource(); } else if(propertyName.equalsIgnoreCase( "name" )) { return getName(); } else { return super.get( propertyName ); } }
/** * Returns the image found in the page with the specified name. **/ public WebImage getImageWithName( String name ) { WebImage[] images = getImages(); for (int i = 0; i < images.length; i++) { if (HttpUnitUtils.matches( name, images[i].getName() )) return images[i]; } return null; }
/** * Returns the first image found in the page with the specified alt attribute. **/ public WebImage getImageWithAltText( String altText ) { WebImage[] images = getImages(); for (int i = 0; i < images.length; i++) { if (HttpUnitUtils.matches( altText, images[i].getAltText() )) return images[i]; } return null; }
public ScriptingHandler[] getImages() { WebImage[] images = HTMLPage.this.getImages(); ScriptingHandler[] result = new WebImage.Scriptable[ images.length ]; for (int i = 0; i < images.length; i++) { result[i] = images[i].getScriptingHandler(); } return result; }
private WebImage toWebImage( Element child ) { return new WebImage( _response, this, _baseURL, (HTMLImageElement) child, _frame, _baseTarget, _characterSet ); }
public Object get( String propertyName ) { if (propertyName.equalsIgnoreCase( "src" )) { return getSource(); } else if(propertyName.equalsIgnoreCase( "name" )) { return getName(); } else { return super.get( propertyName ); } }
/** * Returns the image found in the page with the specified name. **/ public WebImage getImageWithName( String name ) { WebImage[] images = getImages(); for (int i = 0; i < images.length; i++) { if (HttpUnitUtils.matches( name, images[i].getName() )) return images[i]; } return null; }
/** * Returns the link which contains the first image with the specified text as its 'alt' attribute. **/ public WebLink getLinkWithImageText( String text ) { WebImage image = getImageWithAltText( text ); return image == null ? null : image.getLink(); }
/** * Returns the first image found in the page with the specified alt attribute. **/ public WebImage getImageWithAltText( String altText ) { WebImage[] images = getImages(); for (int i = 0; i < images.length; i++) { if (HttpUnitUtils.matches( altText, images[i].getAltText() )) return images[i]; } return null; }
private WebImage toWebImage( Element child ) { return new WebImage( _response, this, _baseURL, (HTMLImageElement) child, _frame, _baseTarget, _characterSet ); }
/** * Returns the first image found in the page with the specified src attribute. **/ public WebImage getImageWithSource( String source ) { WebImage[] images = getImages(); for (int i = 0; i < images.length; i++) { if (HttpUnitUtils.matches( source, images[i].getSource() )) return images[i]; } return null; }