Reputation: 11
I have tried the FirefoxProfile
, but I received the exception -
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space.
Using following code -
ProfilesIni prf=new ProfilesIni();
FirefoxProfile profile=prf.getProfile("default-1453281235998");
WebDriver driver=new FirefoxDriver(profile);
driver.get("http://192.168.5.14/ames_1.3.0/login");
driver.findElement(By.id("txtUser")).sendKeys("XXX");
driver.findElement(By.id("txtPass")).sendKeys("XXX");
driver.findElement(By.xpath("//input[@value='LOGIN']")).click();
try{
driver.findElement(By.id("act2")).click();
}
catch(NoSuchElementException ex)
{
}
driver.findElement(By.id("adminBannerLink_id")).click();
driver.findElement(By.id("BGMLink_id")).click();
driver.findElement(By.id("BSGMLink_id")).click();
Upvotes: 0
Views: 423
Reputation: 61
java.lang.OutOfMemoryError: Java heap space. means your heap space maybe too small. try use java -Xms128m -Xmx1024m -jar selenium.jar.
JAVA OPTS see: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
Upvotes: 2