I am working on selenium 2.18.0 version with firefox 8.0.1.While executing script i am getting error like
15:52:07.342 INFO - Started HttpContext[/wd,/wd]
15:52:07.347 INFO - Started SocketListener on 0.0.0.0:5603
15:52:07.348 INFO - Started org.openqa.jetty.jetty.Server@33db4f6f
15:52:07.441 INFO - Preparing Firefox profile...
15:52:11.549 INFO - Launching Firefox...
15:52:15.106 INFO - Checking Resource aliases
15:52:17.008 INFO - Checking Resource aliases
15:52:17.012 INFO - Received posted results
15:52:17.558 INFO - Killing Firefox...
15:52:17.560 WARN - Firefox seems to have ended on its own (did we kill the real
browser???)
so i am not able to run script.
What can i do so that this error will resolve?
This is script i have generated by using IDE
<tr>
<td>open</td>
<td>http://www.gmail.com</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=Email</td>
<td>test</td>
</tr>
<tr>
<td>type</td>
<td>id=Passwd</td>
<td>test</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>id=signIn</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
<td>//div[@id=':oy']/div/div</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=to</td>
<td>[email protected]</td>
</tr>
<tr>
<td>type</td>
<td>name=subject</td>
<td>testSubject</td>
</tr>
<tr>
<td>type</td>
<td>css=body[class='editable LW-avf']</td>
<td>asdasd</td>
</tr>
<tr>
<td>keyPress</td>
<td>//div/b[text()='Send']</td>
<td>13</td>
</tr>
this is first time i am using selenium RC, may be something missed out by me, but i am not able to get that one
i tried with IE 8 getting same error i.e.19:20:40.586 WARN - Embedded iexplore seems to have ended on its own (did we kil l the real browser???)
done with export (java)
Java Code
package com.example.tests;
import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;
public class 123 extends SeleneseTestCase {
public void setUp() throws Exception {
setUp("http://www.google.com/", "*chrome");
}
public void test123() throws Exception {
selenium.start();
selenium.open("http://www.gmail.com");
selenium.type("id=Email", "asd");
selenium.type("id=Passwd", "trest");
selenium.click("id=signIn");
selenium.waitForPageToLoad("30000");
selenium.clickAt("//div[@id=':oy']/div/div", "");
selenium.type("name=to", "[email protected]");
selenium.type("name=subject", "testSubject");
selenium.type("css=body[class='editable LW-avf']", "asdasd");
selenium.keyPress("//div/b[text()='Send']", "13");
}
}
3 Answers 3
Looks like you are trying to connect to a non-standard port for Selenium RC, I assume Selenium-Server isn't running on that port (This is usually the cause of errors like this).
Try changing your code to:
selenium = new DefaultSelenium("localhost", 4444, "*firefox", "<siteYouAreTesting>");
my assumption is that you currently have the port set to 5603 instead of 4444.
Of course this is largely guesswork as you have supplied no code...
-
for port 4444, i am getting same error - > 09:19:32.082 INFO - Started SocketListener on 0.0.0.0:4444 09:19:32.083 INFO - Started org.openqa.jetty.jetty.Server@33db4f6f 09:19:32.284 INFO - Preparing Firefox profile... 09:19:38.515 INFO - Launching Firefox... 09:19:43.229 INFO - Checking Resource aliases 09:19:44.933 INFO - Checking Resource aliases 09:19:44.935 INFO - Received posted results 09:19:45.521 INFO - Killing Firefox... 09:19:45.526 WARN - Firefox seems to have ended on its own (did we kill the real browser???) 09:19:45.587 INFO - Shutting down...rohit ware– rohit ware2012年02月07日 03:50:46 +00:00Commented Feb 7, 2012 at 3:50
maybe try running the jar file outside your testing script from the command line and subsequently running your test script. use java -jar selenium-server-standalone-2.18.0.jar also upgrade your firefox to 10.
try to use the "*iexploreproxy" instead of *iexplore and same for firefox "*firefoxproxy" also set your port to 4444.
-
Thanks, I have tried this solution but for this i am getting error - Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) Timestamp: 2012年2月14日 05:22:48 UTC Message: Access is denied. Line: 184 Char: 9 Code: 0 URI: google.com/selenium-server/core/scripts/selenium-testrunner.js Message: 'pathname' is null or not an object Line: 1106 Char: 9 Code: 0 URI: google.com/selenium-server/core/scripts/selenium-testrunner.jsrohit ware– rohit ware2012年02月14日 05:24:03 +00:00Commented Feb 14, 2012 at 5:24
-
for firefox lot of setting has to be done. try it in explorer because its the default browser for selenium in windows. also make sure ur server is running properlyKanishka Choudhury– Kanishka Choudhury2012年02月15日 07:02:01 +00:00Commented Feb 15, 2012 at 7:02
-
i have tried explorer, but getting error. I have mentioned that error above to your commentrohit ware– rohit ware2012年02月27日 09:13:00 +00:00Commented Feb 27, 2012 at 9:13
-
try adding firefox to your path variableKanishka Choudhury– Kanishka Choudhury2012年03月05日 09:36:58 +00:00Commented Mar 5, 2012 at 9:36
15:52:17.558 INFO - Killing Firefox...
.