- divya_agsrdkProfessional
- Posts : 93
Join date : 2013-01-17
com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure.
Fri Mar 01, 2013 2:37 pm
My program is to count the number of items in a combobox.
import com.thoughtworks.selenium.*;
public class combocountitem extends SeleneseTestCase {
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*chrome",
"file:///C:/Documents and Settings/Desktop/p.html");
selenium.start();}
public void testloginlogout(){
selenium.setSpeed("1000");
selenium.open("file:///C:/Documents and Settings/Desktop/p.html");
selenium.waitForPageToLoad("30000");
selenium.windowMaximize();
String[] selectelements = new String[1000];
selectelements= selenium.getSelectOptions("//select");
System.out.println("The number of options present in the given select box is "
+selectelements.length);
}
}
p.html
ERROR IN ECLIPSE:
com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure. Please search the user group at https://groups.google.com/forum/#!forum/selenium-users for error details from the log window. The error message is: Access to 'file:///C:/Documents%20and%20Settings/Desktop/p.html' from script denied
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:112)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:106)
at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:369)
at combocountitem.testloginlogout(combocountitem.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:248)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
import com.thoughtworks.selenium.*;
public class combocountitem extends SeleneseTestCase {
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*chrome",
"file:///C:/Documents and Settings/Desktop/p.html");
selenium.start();}
public void testloginlogout(){
selenium.setSpeed("1000");
selenium.open("file:///C:/Documents and Settings/Desktop/p.html");
selenium.waitForPageToLoad("30000");
selenium.windowMaximize();
String[] selectelements = new String[1000];
selectelements= selenium.getSelectOptions("//select");
System.out.println("The number of options present in the given select box is "
+selectelements.length);
}
}
p.html
ERROR IN ECLIPSE:
com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure. Please search the user group at https://groups.google.com/forum/#!forum/selenium-users for error details from the log window. The error message is: Access to 'file:///C:/Documents%20and%20Settings/Desktop/p.html' from script denied
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:112)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:106)
at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:369)
at combocountitem.testloginlogout(combocountitem.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:248)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
- divya_agsrdkProfessional
- Posts : 93
Join date : 2013-01-17
Re: com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure.
Wed Mar 06, 2013 1:27 pm
The scripts which runs today are failing the other day. I am not sure why it is happening .the above exceptions that am getting often. I searched a lot. but still it is failing.
Kindly help what should i do to avoid this in the future
Kindly help what should i do to avoid this in the future
- divya_agsrdkProfessional
- Posts : 93
Join date : 2013-01-17
Re: com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure.
Tue Mar 19, 2013 2:51 pm
any solution to this??
- Sponsored content
- ERROR: Command execution failure. Please search the forum at http://clearspace.openqa.org for error details from the log window. The error message is: Permission denied
- Creating detail log for selenium command execution (Selenium RC Java client)?
- Getting the error msg 'Error: Could not find or load main class java-jar' while executing the selenium code in eclipse
- Error in selenium ide when i execute verifyTextPresent after clickAndWait command
- Error for type command to replicate Browse and Upload in RC
Permissions in this forum:
You cannot reply to topics in this forum