I have created a simple test that launches browser and calls a URL. This works fine in IE but when I select Firefox (FF) browser it opens a blank page. See the code snippet below.
The issue is similar to this post that concludes one has to change the settings in about:config
's toolkit.telemetry.prompted
to 2.
But in my case its already 2, hence I have posted the issue.
Any help would be appreciated.
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.server.SeleniumServer;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import com.thoughtworks.selenium.*;
public class BascOne extends SeleneseTestBase {
private SeleniumServer seleniumserver;
//start the selenium server
@Before
public void startServer()
{
try {
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Test
public void launchTest() throws Exception
{
seleniumserver = new SeleniumServer();
seleniumserver.start();
setUp("http://yahoo.com/", "firefox");
selenium.windowMaximize();
selenium.windowFocus();
System.out.println("IN THE TEST METHOD");
selenium.open("http://yahoo.com/");
System.out.println("BEFORE WAIT");
if(selenium != null){
System.out.println("Is there any exception");
try {
System.out.println("In the try block");
selenium.close();
selenium.shutDownSeleniumServer();
} catch(Exception exp) {
System.out.println("Shutdown exception: " + exp.getMessage());
}
}
}
@After
public void tearDown() {
}
}
startServer()
has no block throwing exception?