public void setUp() {
   selenium = new DefaultSelenium("localhost", 4444, "*firefoxproxy", BASE_URL);
   selenium.start();
   flashApp = new FlashSelenium(selenium, "coloredSquare");
   selenium.open(BASE_URL + PAGE);
   assertEquals(100, flashApp.PercentLoaded());
 }
 public void testRectangleLabel() {
   assertEquals("(Click here)", flashApp.call("getSquareLabel"));
   flashApp.call("setSquareLabel", "Dummy Label");
   assertEquals("Dummy Label", flashApp.call("getSquareLabel"));
 }
 public void testColorTransition() {
   assertEquals("Clicking Colors", selenium.getTitle());
   assertEquals(GREEN, flashApp.call("getColor"));
   assertEquals("(Click here)", flashApp.call("getSquareLabel"));
   flashApp.call("click");
   assertEquals(BLUE, flashApp.call("getColor"));
   assertEquals(BLUE, flashApp.call("getSquareLabel"));
   flashApp.call("click");
   assertEquals(RED, flashApp.call("getColor"));
   assertEquals(RED, flashApp.call("getSquareLabel"));
   flashApp.call("click");
   assertEquals(GREEN, flashApp.call("getColor"));
   assertEquals(GREEN, flashApp.call("getSquareLabel"));
 }