- Jeeva patrose
- Posts : 8
Join date : 2012-06-01
Unable to run TestNG Testcase in Eclipse by using Mozilla Browser
Tue Jun 12, 2012 3:20 pm
Hi,
I am trying to execute Selenium Test case by using Test NG Frame work in Mozilla Firefox and IE Browser. But I am getting below Pop up error: Could you pls help me out on this?
Attaching the Error and also sample code below for more info
An error has occurred in the script on this page
Line: 870
Char :9
Error: Could not App window; is the Pop up Blocker enabled?
Code: 0
file:///C:/Users/JEEVA~1.PAT/AppData/Local/Temp/customProfileDira30b441ae7de4f448b914cd9748a1644/core/scripts/htmlutils.js
Do you want to continue running scripts on this page?
Yes NO
Sample Code:
mport com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.testng.annotations.*;
import static org.testng.Assert.*;
import java.util.regex.Pattern;
public class NewTest extends SeleneseTestNgHelper{
@BeforeClass
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*Firefox C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", "http://book.theautomatedtester.co.uk/");
selenium.start();
selenium.setSpeed("1000");
}
@Test public void testUntitled() throws Exception {
selenium.open("/http://book.theautomatedtester.co.uk");
selenium.click("link=Chapter1");
selenium.waitForPageToLoad("30000");
selenium.select("id=selecttype", "label=Selenium RC");
selenium.click("id=radiobutton");
selenium.click("id=multiplewindow");
selenium.waitForPopUp("popupwindow", "30000");
}
@AfterClass
public void tearDown() throws Exception {
selenium.stop();
}
}
I am trying to execute Selenium Test case by using Test NG Frame work in Mozilla Firefox and IE Browser. But I am getting below Pop up error: Could you pls help me out on this?
Attaching the Error and also sample code below for more info
An error has occurred in the script on this page
Line: 870
Char :9
Error: Could not App window; is the Pop up Blocker enabled?
Code: 0
file:///C:/Users/JEEVA~1.PAT/AppData/Local/Temp/customProfileDira30b441ae7de4f448b914cd9748a1644/core/scripts/htmlutils.js
Do you want to continue running scripts on this page?
Yes NO
Sample Code:
mport com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.testng.annotations.*;
import static org.testng.Assert.*;
import java.util.regex.Pattern;
public class NewTest extends SeleneseTestNgHelper{
@BeforeClass
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*Firefox C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", "http://book.theautomatedtester.co.uk/");
selenium.start();
selenium.setSpeed("1000");
}
@Test public void testUntitled() throws Exception {
selenium.open("/http://book.theautomatedtester.co.uk");
selenium.click("link=Chapter1");
selenium.waitForPageToLoad("30000");
selenium.select("id=selecttype", "label=Selenium RC");
selenium.click("id=radiobutton");
selenium.click("id=multiplewindow");
selenium.waitForPopUp("popupwindow", "30000");
}
@AfterClass
public void tearDown() throws Exception {
selenium.stop();
}
}
- Jeeva patrose
- Posts : 8
Join date : 2012-06-01
Re: Unable to run TestNG Testcase in Eclipse by using Mozilla Browser
Mon Jun 25, 2012 5:46 pm
Hi,
I got the solution for this query.
Please follow the below query instead of the one used in the above.It works:)
selenium = new DefaultSelenium("localhost", 4444, "*firefoxproxy", "http://book.theautomatedtester.co.uk/");
Regards,
Jeeva
I got the solution for this query.
Please follow the below query instead of the one used in the above.It works:)
selenium = new DefaultSelenium("localhost", 4444, "*firefoxproxy", "http://book.theautomatedtester.co.uk/");
Regards,
Jeeva
Permissions in this forum:
You cannot reply to topics in this forum