I am using Eclipse IDE and using testNG framework.
I have specified firefox but the test runner opens in Firefox and test gets executed in IE.
Here is my code:
public class Flipkart extends SeleneseTestNgHelper {
@BeforeTest
public void setup()
{
selenium = new DefaultSelenium("localhost" ,4444, "*firefox", "http://www.flipkart.com");
selenium.start();
selenium.windowMaximize();
}
@Test
public void testFlipkart() throws Exception {
selenium.open("http://www.flipkart.com");
verifyEquals(selenium.getTitle(), "Online Shopping India | Buy Books, Mobiles, Cameras, Laptops, Electronics, Accessories, Lifestyle Products | Flipkart.com");
verifyTrue(selenium.isTextPresent("Featured:"));
}
}
Has anyone faced the same problem. Please suggest what’s wrong with code.
change the eclipse default browser to firefox(sometimes it helps)
add firefox to class path. also take a look at the firefox version you are using this should be compatible with selenium