Exception, Java, Selenium grid, TestNG

selenium grid: org.openqa.selenium.remote. UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.


[TestNG] Running:
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'ksehgal', ip: '', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_43'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:589)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:153)
at blogExample.TestingBot.setUp(TestingBot.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:175)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:107)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:335)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:330)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:178)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
at org.openqa.selenium.remote.HttpCommandExecutor.fallBackExecute(HttpCommandExecutor.java:322)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:301)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:568)
... 28 more

Continue reading “selenium grid: org.openqa.selenium.remote. UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.”

Continuous Integration, git, Java, Jenkins, Uncategorized, version control

Jenkins installation

Jenkins is a very useful tool not for the DevOps engineer but for the whole agile team. From coding to the last deployment of code it is a widely accepted tool of continuous integration. In this blog post, I will be sharing the steps to install Jenkins.

Jenkins can be installed on the local machine as well as server-client set up in the same way a new software can be added to the Application list.

Continue reading “Jenkins installation”

Exception, Functional Tests, Java, Selenium Errors

org.openqa.selenium.WebDriverException: Error forwarding the new session Empty pool of VM for setup Capabilities [{browserName=safari}]

Problem Statement

Exception in thread "main" org.openqa.selenium.WebDriverException: Error forwarding the new session Empty pool of VM for setup Capabilities [{browserName=safari}]
Command duration or timeout: 198 milliseconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'XXXX', ip: '', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_67'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
 at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
 at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
 at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
 at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
 at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
 at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:153)
 at remoteDriver.TestFireFoxRemotely.main(TestFireFoxRemotely.java:17)

Caused by: org.openqa.grid.common.exception.GridException: Error forwarding the new session Empty pool of VM for setup Capabilities [{browserName=safari}]
 at org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:114)
 at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:83)
 at org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:67)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
 at org.seleniumhq.jetty7.servlet.ServletHolder.handle(ServletHolder.java:565)
 at org.seleniumhq.jetty7.servlet.ServletHandler.doHandle(ServletHandler.java:479)
 at org.seleniumhq.jetty7.server.session.SessionHandler.doHandle(SessionHandler.java:225)
 at org.seleniumhq.jetty7.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
 at org.seleniumhq.jetty7.servlet.ServletHandler.doScope(ServletHandler.java:406)
 at org.seleniumhq.jetty7.server.session.SessionHandler.doScope(SessionHandler.java:186)
 at org.seleniumhq.jetty7.server.handler.ContextHandler.doScope(ContextHandler.java:965)
 at org.seleniumhq.jetty7.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
 at org.seleniumhq.jetty7.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
 at org.seleniumhq.jetty7.server.Server.handle(Server.java:349)
 at org.seleniumhq.jetty7.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
 at org.seleniumhq.jetty7.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
 at org.seleniumhq.jetty7.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894)
 at org.seleniumhq.jetty7.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948)
 at org.seleniumhq.jetty7.http.HttpParser.parseNext(HttpParser.java:857)
 at org.seleniumhq.jetty7.http.HttpParser.parseAvailable(HttpParser.java:235)
 at org.seleniumhq.jetty7.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
 at org.seleniumhq.jetty7.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
 at org.seleniumhq.jetty7.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
 at org.seleniumhq.jetty7.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
 at java.lang.Thread.run(Thread.java:745)

Continue reading “org.openqa.selenium.WebDriverException: Error forwarding the new session Empty pool of VM for setup Capabilities [{browserName=safari}]”

Automation, Automation Framework, BDD, Behaviour Driven Development, eclipse, Functional Testing, Java, Testing

java.lang.UnsupportedClassVersionError: com/CucumberOptions/RunCukeTest : Unsupported major.minor version 51.0

Hi all, I am trying to run an existing project of cucumber in my existing eclipse and faced an issue. In this piece of write-up I will be sharing the resolution of the Error I got while executing the project.
Continue reading “java.lang.UnsupportedClassVersionError: com/CucumberOptions/RunCukeTest : Unsupported major.minor version 51.0”

eclipse, Java, Maven, SubVersion, TestNG

Eclipse – Integrated Development Environment

Today I will share my personal know-how of a great tool which every developer must have used and many automation tester should-have used. This is an Integrated Development Environment and is very likely known tool among-st IT world.

For development purpose we can use Eclipse. It comes in exotic flavors, depending on the requirement you can opt for any.

TIP: Always go with the flow, i.e. always take the latest and most stable version of the open-source tool.

Gone with the days, where we use to type all programs on Notepad and try executing it with the compiler-first and then executor. Here comes the mostly adopted and highly recommended tool for project developement. Not only small-size projects but also Enterprise Edition, Standard Editions, Mobile Edition type projects.

Eclipse is a well-to-do Integrated Development Environment that can be used for Java, groovy, grails, and much-more development. You can pick one that suits your desires from a whole lot of list available here.

Continue reading “Eclipse – Integrated Development Environment”

Automation, Automation Framework, eclipse, Java, Maven, Page Object Model, Selenium, Web Automation

Maven : Know-how !

To build the Enterprise Edition applications we use Maven.

Please download and install Maven. The build is tested with version 2.2.1 and 2.0.9.

The maven build should be able to set up the sources out of the box. The build should construct all components of the application (e.g. Java Archives, Web application archives, Flex application, etc.) automatically and consolidate them to deployable packages.
Continue reading “Maven : Know-how !”

Java, Java Basics, Java Class, Java Object, Java Polymorphism, Object Oriented

Polymorphism concept to the beginners.

Most common question asked in interviews is the OOPS concept details , meaning and example. Today, I will be sharing some real life example of Polymorphism and in my coming blogs I will be sharing some real time examples of other OOPS concept.

This is basically a concept by which one API once written can be used by many other similar classes. We will see how we can implement and use polymorphism in Java.

Java is a language which supports flexibility of code to a good extend. Here code written in single class can be used by other classes also.  Poly- means many and morph- means form . So an ability of classes to have different forms is known as Poly-morphism.

Continue reading “Polymorphism concept to the beginners.”

Automation Framework, best practises, Design Pattern, Design patterns, Java, javaScript, nodejs, npm, Page Object Model, protractor, Quality Analyst, Selenium, Testing, typescript, Web Testing

Unhandled rejection RangeError: Maximum call stack size exceeded

While working with protractor with Typescript me and my team was facing this issue. I thought of sharing this here as it was a good finding. Issue was this:-

Unhandled rejection RangeError: Maximum call stack size exceeded
    at new Wait (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\utilities\Wait.ts:5:1)
    at new SelectDropDown (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\utilities\SelectDropDown.ts:5:1)
    at new CLASS1 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS1.ts:29:23)
    at new CLASS2 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS2.ts:25:32)
    at new CLASS3 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS3.ts:26:25)
    at new CLASS1 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS1.ts:30:41)
    at new CLASS2 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS2.ts:25:32)
    at new CLASS3 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS3.ts:26:25)
    at new CLASS1 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS1.ts:30:41)
    at new CLASS2 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS2.ts:25:32)
    at new CLASS3 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS3.ts:26:25)
    at new CLASS1 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS1.ts:30:41)
    at new CLASS2 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS2.ts:25:32)
    at new CLASS3 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS3.ts:26:25)
    at new CLASS1 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS1.ts:30:41)
    at new CLASS2 (D:\workspace\DemoProject\latest-code\protractor-cucumber\e2e\com.blog.page\CLASS2.ts:25:32)
Continue reading “Unhandled rejection RangeError: Maximum call stack size exceeded”
Agile Testing, Automation, Automation Framework, Java, Java Basics, Selenium, Uncategorized, Web Automation, Web Testing

org.openqa.selenium.firefox.NotConnectedException Unable to connect to host on port 7055 after 45000 ms- Selenium Issue resolution on Firefox

Hi every one , I have started working on selenium some years back and there are multiple issues which I have seen from the beginning of my career. Today I will share a resolution of an issue which is most common and if you go through the error log you will not get any clue what the issue is all about .

Continue reading “org.openqa.selenium.firefox.NotConnectedException Unable to connect to host on port 7055 after 45000 ms- Selenium Issue resolution on Firefox”

Java, Java Basics, Java Class, Java Object, Object Oriented, Uncategorized

Java – A learning curve .

Today I would like to share my own experience of learning Java. To be honest , I had no idea of Java coding in my college days, during my graduation . As a common- fun -loving student I enjoyed bunking classes , running away from assignments , classes , labs , etc. But when I came into IT professional-magical-world , and started looking out for people around me .. then an urge of learning comes to me , it happens to me today also . And it happens very often , believe me.


Here I realized that ‘Learning’ is the only investment which always benefits you throughout your life. And trust me , I gradually started observing that yeah ! this is actually working 🙂 . I started my carrier as Quality Analyst being a person who loves to talk (O ya 😀 ) , who wants to work in IT but doesnot want to invest entire time in IT/Testing/Coding . Actually , I want to FLY(First Love Yourself) and wanted to work in all directions .

Continue reading “Java – A learning curve .”

Agile Testing, Automation, Design patterns, Functional Testing, Java, Page Object Model, Quality Analyst, Selenium, Testing, Web Automation, Web Testing

Why to apply Page Object Model in automation frameworks.

Today I will share how and why we can apply design pattern concepts while creating a new framework. Lets try and understand why we need any design pattern in our project. No doubt we can make a framework be it automation or any feature specific project but if we talk about a big Enterprise edition project then we have to think of factors like optimal solutions, performance, maintainability etc. Similarly we can directly use the play-records plugin of Selenium and start applying further concepts over it. Then why people are not utilizing it ? Moreover inclination is more towards Selenium webdriver whole-some project. Let us see what all factors attract a user to use Selenium Webdriver instead of the fact that Selenium IDE can generate automation code in any of your favorite language like Java, etc

  1. Code is rigid.
  2. You can make classes out of the code but not any framework.
  3. You have to certainly perform the record and play option again and again if any test case fail.
  4. This idea will definitely give you a piece of code but not a project on which you can rely upon.

Lets understand this with a picture, it would be difficult for this guy to find a way. But it would be much easier if something like this might happen to him.

Make sense, yeah…err…no!! Ok. What I mean is if we can specify directly that what path to take and when, then it might help the reader to understand better, as simple as this. Design patterns also helps us in doing the same stuff for our code, so that we can arrange our code snippets, classes, packages, etc in such a manner that it would help in making code more readable, understandable and manageable.

Advantages of page object pattern:

  1. Makes tests more readable and robust.
  2. Bring down the duplication of code.
  3. Improves the maintainability of tests, remarkably when there is frequent change in the AUT. (Useful in Agile methodology based projects).
  4. Simple and clear tests.
  5. Good support of tests, because everything is stored in one place.
  6. Easy creation of new tests. In fact, tests can be created by a person not knowing the features of automation tools.
  7. The UI changes, the fix need only be applied in one place.
  8. Code re-use: Able to use the same page object in a variety of tests cases.

In the coming blog I will be discussing how we can apply this Page Object Concept in Selenium scripts.

Automation, Automation Framework, eclipse, Java, Java Basics, Selenium, Testing, Uncategorized, Web Automation, Web Testing

My First Selenium – Java Project in eclipse.

Today I will be sharing how to start making new selenium project.I will start with some basic requirements and then will be proceeding to the art of making selenium test scripts.


1. Basic knowledge of a programming language like Java , C, Ruby , etc.

See link to learn Java .

2. Basic knowledge of Selenium tool.

3. Art of finding locators.

4. Set up of eclipse on the operating system you are using.

5. Java set up on your computer machine, in case you are using Java.
Continue reading “My First Selenium – Java Project in eclipse.”