seleniumRC error in safari

29 Views Asked by At

I have created script, ie small script need to open google website, that's it.

This is working fine with Firefox, google-chrome. But not with the safari. why?

Actually it is launching safari browser but it is not running[not opening URL]. Don't know why?

OS: Mac OS X 10.12.3 x86_64

Selenium Version: selenium-server-standalone-2.53.1.jar

Browser: safari

Steps to reproduce This is the code I used

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://www.google.co.in/" />
<title>test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">test</td></tr>
</thead><tbody>
<tr>
        <td>open</td>
        <td>/?gfe_rd=cr&amp;ei=4EXnWLyLOdiAoAOQrofAAw</td>
        <td></td>
</tr>
<tr>
        <td>click</td>
        <td>id=lst-ib</td>
        <td></td>
</tr>
<tr>
        <td>type</td>
        <td>id=lst-ib</td>
        <td>check safari browser</td>
</tr>
<tr>
        <td>click</td>
        <td>name=btnK</td>
        <td></td>
</tr>

</tbody></table>
</body>
</html>

This code I executed(run)

java -jar selenium-server-standalone-2.53.1.jar -htmlsuite "*safari" "https://www.google.com" "test_suite.html" "result_safari.html"

This is the error I got

19:50:20.287 INFO - Launching a standalone Selenium Server
19:50:20.341 INFO - Java: Oracle Corporation 25.77-b03
19:50:20.341 INFO - OS: Mac OS X 10.12.3 x86_64
19:50:20.367 INFO - v2.53.1, with Core v2.53.1. Built from revision a36b8b1
19:50:20.464 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform MAC
19:50:20.465 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform MAC
19:50:20.465 INFO - Driver class not found: com.opera.core.systems.OperaDriver
19:50:20.465 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
19:50:20.468 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUnitDriver
19:50:20.468 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver is not registered
jar:file:/Users/<userName>/Downloads/test/selenium-server-standalone-2.53.1.jar!/core
19:50:20.673 INFO - Launching Safari to visit 'file:/var/folders/p0/_vchgbcj10ddvy8h9gtyvxs00000gn/T/customProfileDir220575/core/RemoteRunner.html?auto=true&multiWindow=true&defaultLogLevel=info&baseUrl=https%3A%2F%2Fwww.google.com&resultsUrl=../postResults&test=https%3A%2F%2Fwww.google.com%2Fselenium-server%2Ftests%2Ftest_suite.html&driverUrl=http://localhost:4444/selenium-server/driver/' via '/var/folders/p0/_vchgbcj10ddvy8h9gtyvxs00000gn/T/customProfileDir220575/redirect_to_go_to_selenium.htm'...
19:50:24.964 WARN - POST /selenium-server/driver/?seleniumStart=true&localFrameAddress=top&seleniumWindowName=&uniqueId=sel_75180&counterToMakeURsUniqueAndSoStopPageCachingInTheBrowser=1492093224878&sequenceNumber=0 HTTP/1.1
java.lang.NullPointerException: sessionId should not be null; has this session been started yet?
    at org.openqa.selenium.server.FrameGroupCommandQueueSet.getQueueSet(FrameGroupCommandQueueSet.java:220)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleBrowserResponse(SeleniumDriverResourceHandler.java:186)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:152)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
    at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
    at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
    at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
    at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
    at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
    at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
    at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
19:50:27.244 WARN - POST /selenium-server/driver/?seleniumStart=true&localFrameAddress=top&seleniumWindowName=&uniqueId=sel_75180&counterToMakeURsUniqueAndSoStopPageCachingInTheBrowser=1492093227216&sequenceNumber=1 HTTP/1.1
java.lang.NullPointerException: sessionId should not be null; has this session been started yet?
    at org.openqa.selenium.server.FrameGroupCommandQueueSet.getQueueSet(FrameGroupCommandQueueSet.java:220)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleBrowserResponse(SeleniumDriverResourceHandler.java:186)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:152)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
    at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
    at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
    at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
    at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
    at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
    at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
    at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
19:50:30.308 WARN - POST /selenium-server/driver/?seleniumStart=true&localFrameAddress=top&seleniumWindowName=&uniqueId=sel_75180&counterToMakeURsUniqueAndSoStopPageCachingInTheBrowser=1492093230216&sequenceNumber=2 HTTP/1.1
java.lang.NullPointerException: sessionId should not be null; has this session been started yet?
    at org.openqa.selenium.server.FrameGroupCommandQueueSet.getQueueSet(FrameGroupCommandQueueSet.java:220)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleBrowserResponse(SeleniumDriverResourceHandler.java:186)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:152)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
    at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
    at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
    at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
    at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
    at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
    at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
    at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
19:52:04.079 WARN - POST /selenium-server/driver/?seleniumStart=true&localFrameAddress=top&seleniumWindowName=&uniqueId=sel_75180&counterToMakeURsUniqueAndSoStopPageCachingInTheBrowser=1492093324049&sequenceNumber=3 HTTP/1.1
java.lang.NullPointerException: sessionId should not be null; has this session been started yet?
    at org.openqa.selenium.server.FrameGroupCommandQueueSet.getQueueSet(FrameGroupCommandQueueSet.java:220)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleBrowserResponse(SeleniumDriverResourceHandler.java:186)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:152)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
    at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
    at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
    at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
    at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
    at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
    at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
    at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
19:52:36.818 WARN - POST /selenium-server/driver/?seleniumStart=true&localFrameAddress=top&seleniumWindowName=&uniqueId=sel_75180&counterToMakeURsUniqueAndSoStopPageCachingInTheBrowser=1492093356812&sequenceNumber=4 HTTP/1.1
java.lang.NullPointerException: sessionId should not be null; has this session been started yet?
    at org.openqa.selenium.server.FrameGroupCommandQueueSet.getQueueSet(FrameGroupCommandQueueSet.java:220)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleBrowserResponse(SeleniumDriverResourceHandler.java:186)
    at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:152)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
    at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
    at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
    at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
    at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
    at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
    at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
    at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
    at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)

Same code is going through in Firefox, chrome in mac. But not in Safari.

What is the wrong in this?

How can I run?

0

There are 0 best solutions below