Selenium Flex - Eclipse: seleniumexception document is unidentified error message while running via JUnit

71 views
Skip to first unread message

aditya mullapudi

unread,
Jun 22, 2013, 4:19:40 PM6/22/13
to sfapi-...@googlegroups.com
Hello Everyone:

I'm working on Selenium RC from couple of years and on WebDriver from past couple of months. In my project I had an requirement to automate a Flex application which is like logging into app and clicking different tabs, buttons, typing text etc.

The application was rebuild with SeleniumFlexAPI.SWC and I was able to identify the objects using the Selenium IDE.

I have written below framework in Eclipse Juno , but when I try to run as JUnit 3 tests, I see say following error.

"com.thoughworks.selenium.SeleniumException:ERROR: threw an exception: document.Wixie1 is undefined"

I have added, 'flex-ui-selenium-0.0.1. jar, flash-selenium.jar, flashselenium-java-client-extension.jar files to the eclipse build path.

Any idea where I'm getting wrong?

Thanks in advance,
Aditya


import org.junit.*;

import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.FlashSelenium;
import com.thoughtworks.selenium.Selenium;
import sfapi.FlexUISelenium;

public class Test extends TestCase {
        public
String URL = "https://wixie1.qa.wixie.com";
        public Selenium selenium;
       
public FlexUISelenium fs;
       
       

       
public void setUp() throws Exception {
                selenium
= new DefaultSelenium("localhost", 4444, "*firefox",URL);
                selenium
.start();
                fs
= new FlexUISelenium(selenium, "Wixie1");
selenium.open(URL);
selenium.windowMaximize();
fs.waitUntilLoaded();
         
       
}

       
    public void tearDown() throws Exception {
                selenium
.stop();
       
}

       
  public void TestInitiation() throws Exception {

selenium.type("text_username", aditya);
selenium.type("password_password", password);
selenium.click("");
thread.sleep(20000);
fs.click("paintButton");
        }

}
Reply all
Reply to author
Forward
0 new messages