Class JAppletDriver

java.lang.Object
org.fest.swing.driver.ComponentDriver
org.fest.swing.driver.JAppletDriver

public class JAppletDriver extends ComponentDriver
Understands functional testing of JApplets:
  • user input simulation
  • state verification
  • property value query
This class is intended for internal use only. Please use the classes in the package org.fest.swing.fixture in your tests.
Since:
1.2
  • Constructor Details

    • JAppletDriver

      public JAppletDriver(Robot robot)
      Creates a new JAppletDriver.
      Parameters:
      robot - the robot to use simulate user input.
  • Method Details

    • appletContextOf

      @RunsInEDT public AppletContext appletContextOf(JApplet applet)
      Returns the AppletContext of the given JApplet.
      Parameters:
      applet - the given JApplet.
      Returns:
      the AppletContext of the given JApplet.
    • appletContext

      @RunsInEDT private static AppletContext appletContext(JApplet applet)
    • resize

      @RunsInEDT public void resize(JApplet applet, int width, int height)
      Requests the given JApplet to be resized.
      Parameters:
      applet - the given JApplet.
      width - the new width.
      height - the new height.
    • doResize

      @RunsInEDT private static void doResize(JApplet applet, int width, int height)
    • codeBaseOf

      @RunsInEDT public URL codeBaseOf(JApplet applet)
      Returns the URL of the directory that contains the given JApplet.
      Parameters:
      applet - the given JApplet.
      Returns:
      the URL of the directory that contains the given JApplet.
    • codeBase

      @RunsInEDT private static URL codeBase(JApplet applet)
    • documentBaseOf

      @RunsInEDT public URL documentBaseOf(JApplet applet)
      Returns the URL of the document the given JApplet is embedded.
      Parameters:
      applet - the given JApplet.
      Returns:
      the URL of the document the given JApplet is embedded.
    • documentBase

      @RunsInEDT private static URL documentBase(JApplet applet)
    • parameterValue

      @RunsInEDT public String parameterValue(JApplet applet, String parameterName)
      Returns the value of the named parameter in the given JApplet in the HTML tag, or null if not set.
      Parameters:
      applet - the given JApplet.
      parameterName - a parameter name.
      Returns:
      the value of the named parameter in the given {code JApplet} in the HTML tag, or null if not set.
    • parameter

      @RunsInEDT private static String parameter(JApplet applet, String parameterName)
    • isActive

      @RunsInEDT public boolean isActive(JApplet applet)
      Indicates whether the given JApplet is active or not.
      Parameters:
      applet - the given JApplet.
      Returns:
      true if the given JApplet is active; false otherwise.
    • active

      @RunsInEDT private static boolean active(JApplet applet)