Scal
unread,May 9, 2011, 10:57:17 AM5/9/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to flex-pilot
These info might be useful to help me:
I create a Selenium object in ParallelRunner.java like this:
public class ParallelRunnableTest
{
private ThreadLocal<Selenium> selenium = new ThreadLocal<Selenium>();
public void startSelenium(Object[] parameter) throws Exception
{
selenium.set(new CustomSelenium('host', 4444, 'browser', 'base
url'));
selenium.get().start();
}
protected Selenium getThreadLocalSelenium()
{
return this.selenium.get();
}
}
My test case classes extends the above:
public class ExampleCaseTest extends ParallelRunnableTest
{
@Test
public void TestCase() throws Exception
{
Selenium selenium = getThreadLocalSelenium();
selenium.click(....);
selenium.flexAssertText("id=testApp",
"chain=name:testTextArea,validator=testing");
}
I created a custom class that extends DefaultSelenium
public class CustomSelenium extends DefaultSelenium
{
public CustomSelenium(String serverHost, int serverPort, String
browserStartCommand, String browserURL) {
super(serverHost, serverPort, browserStartCommand, browserURL);
}
public CustomSelenium(CommandProcessor processor) {
super(processor);
}
public void flexAssertText(String locator,String options) {
commandProcessor.doCommand("flexAssertText", new String[]
{locator,options});
}
}
but the line (selenium.flexAssertText("id=testApp",
"chain=name:testTextArea,validator=testing");) in my test method is
complaining: "The method flexAssertText(String, String) is undefined
for the type Selenium"
Should I implement the Flex-Pilot methods in the Selenium interface
too?
Thanks