I have converted a Selenium Test Suite into JUnit from Selenium IDE, and trying to execute from eclipse. But there is an error in my script in
suite.addTestSuite(Open_Google_IE.class);
suite.addTestSuite(Open_Google_FireFox.class);
Error message: The method addTestSuite(Class) in the type TestSuite is not applicable for the arguments (Class).
Please advise what could be the reason. I have also verified Creating Test Suite in Webdriver and updated test suite but still throws that error.
JUnit TestSuite
import junit.framework.Test;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
@SuiteClasses(value = {Open_Google_IE.class, Open_Google_FireFox.class})
public class OpenGoogle {
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTestSuite(Open_Google_IE.class);
suite.addTestSuite(Open_Google_FireFox.class);
return suite;
}
public static void main(String[] args) {
junit.textui.TestRunner.run(suite());
}
}