com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure.

1,692 views
Skip to first unread message

Divya YA

unread,
Mar 8, 2013, 10:28:41 PM3/8/13
to seleniu...@googlegroups.com
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

<html>
<body>
<select>
<option>Volvo</option>
<option>Express</option>
<option>Mercedes</option>
<option>RajaHamsa</option>
</select>
</body>
</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)

The scripts which runs today are failing on the other day. the above exceptions that am getting often. I searched a lot. but still it is failing. i dint get any solution from google.
Kindly help what should i do to avoid this in the future

Arran

unread,
Mar 9, 2013, 5:05:49 AM3/9/13
to seleniu...@googlegroups.com
The clue is in the error message. It's complaining it cannot access your "p.html" file. Move it some place where it can, i.e off the Desktop!
Message has been deleted
Message has been deleted

Divya YA

unread,
Mar 15, 2013, 2:43:45 AM3/15/13
to seleniu...@googlegroups.com


On Thursday, March 14, 2013 10:43:30 PM UTC-8, Divya YA wrote:


On Thursday, March 14, 2013 10:42:21 PM UTC-8, Divya YA wrote:
 I changed  the path .. moved to D drive.. getting error like this,,

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:///D:/gcd.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 gcd1.testGcd(gcd1.java:16)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)

Divya YA

unread,
Mar 22, 2013, 11:23:04 PM3/22/13
to seleniu...@googlegroups.com
ya exactly... mine is also working now....

On Tuesday, March 19, 2013 4:20:07 PM UTC+5:30, PeterGanza wrote:
Hi, I run into the same problem on friday, figured it out today. The problem
was from firefox which updated to firefox 19 on friday and  screw up
everything.

I uninstalled firefox 19, deleted everything from firefox in program files
and reinstalled firefox 18. My tests now run again fine.

Hope it helps.

Mark Collin

unread,
Mar 26, 2013, 2:34:31 AM3/26/13
to seleniu...@googlegroups.com

Or you could just update to the latest version of selenium for FireFox 19 support.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/Nsqr3NPILa8J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Divya YA

unread,
Mar 27, 2013, 2:20:54 AM3/27/13
to seleniu...@googlegroups.com
As of i m using selenium -server-standalone 2.25.0 and selenium RC 1.0.3 .
For firefox 19, which version supports?

Arran

unread,
Mar 27, 2013, 6:16:52 AM3/27/13
to seleniu...@googlegroups.com
Version 2.31 of Selenium supports FF 19.

Daci

unread,
Jul 22, 2013, 11:09:48 AM7/22/13
to seleniu...@googlegroups.com
same problem: I have FF 22 and selenium-server-standalone-2.33.0 (latest selenium RC - today 22.07.2013) and ERROR: Command execution failure...:-(

Mark Collin

unread,
Jul 22, 2013, 11:12:32 AM7/22/13
to seleniu...@googlegroups.com
Selenium 2.34.0 will support FF22, I suggest dropping back to FF21 until
that is out.
> --
> You received this message because you are subscribed to the Google
> Groups "Selenium Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to selenium-user...@googlegroups.com.
> To post to this group, send email to seleniu...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/selenium-users/ec1aa26c-9b4f-4005-9851-02a7f5fafbe7%40googlegroups.com.

Daci

unread,
Jul 22, 2013, 11:17:00 AM7/22/13
to seleniu...@googlegroups.com
thanks for the blitz-answer Mark. I can't dropping back to FF21 cause i have a managed PC :-( ... so I have 2wait for 2.34
Reply all
Reply to author
Forward
0 new messages