Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
utbipin
Posts : 2
Join date : 2010-11-15

Response_Code = -1 Error_Message = Request Error Empty Response_Code = -1 Error_Message = Request Error

Mon Nov 15, 2010 8:30 pm
Hi,
I am new to Selenium and therefore tried this demo: http://knorrium.info/2010/05/19/a-java-approach-to-selenium/

All were successful except the last part. I did exactly how it is mentioned in the demo.
But I am getting following error. Please help me to resolve it.
Note: I am using all the latest version of the api available: selenium-remote-control-1.0.3 and java 1.6.

com.thoughtworks.selenium.SeleniumException: XHR ERROR: URL = http://demo.opensourcecms.com/wordpress/wp-login.php Response_Code = -1 Error_Message = Request Error
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:335)
at com.example.tests.WordPress.testWordPress(WordPress.java:18)
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:212)
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:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

What is causing this error and what is the possible fix.
avatar
bgsraju
Posts : 3
Join date : 2010-11-17

Response_Code = -1 Error_Message = Request Error Empty Re: Response_Code = -1 Error_Message = Request Error

Wed Nov 17, 2010 3:39 pm
Hi,
Can you post your code so that i can know where the error is coming.
avatar
utbipin
Posts : 2
Join date : 2010-11-15

Response_Code = -1 Error_Message = Request Error Empty Re: Response_Code = -1 Error_Message = Request Error

Wed Nov 17, 2010 5:26 pm
Here is the code:

package com.example.tests;

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.regex.Pattern;

public class WordPress extends SeleneseTestCase {
@Before
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://demo.opensourcecms.com/");
selenium.start();
}

@Test
public void testWordPress() throws Exception {
selenium.open("/wordpress/wp-login.php");
selenium.waitForPageToLoad("30000");
selenium.type("user_login", "admin");
selenium.type("user_pass", "demo123");
selenium.click("wp-submit");
selenium.waitForPageToLoad("30000");
verifyTrue(selenium.isTextPresent("Howdy, admin"));
selenium.click("link=Posts");
selenium.waitForPageToLoad("30000");
selenium.click("link=Add New");
selenium.waitForPageToLoad("30000");
selenium.type("title", "Selenium Demo Post");
selenium.click("publish");
selenium.waitForPageToLoad("30000");
verifyTrue(selenium.isTextPresent("Post published."));
}

@After
public void tearDown() throws Exception {
selenium.stop();
}
}

The code works fine with the *iexplore but gives problem only with the firefox.
avatar
bgsraju
Posts : 3
Join date : 2010-11-17

Response_Code = -1 Error_Message = Request Error Empty Re: Response_Code = -1 Error_Message = Request Error

Wed Nov 17, 2010 7:23 pm
Hi,
It is working fine with the firefox in my machine. I had not changed any thing in the code. The only thing i added the juint-4.0.jar file along with selenium jars. Please check the jar file.


Regards,
Raju
Sponsored content

Response_Code = -1 Error_Message = Request Error Empty Re: Response_Code = -1 Error_Message = Request Error

Back to top
Permissions in this forum:
You cannot reply to topics in this forum