FAILED: test org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {“code”:-32603,”message”:”Cannot navigate to invalid URL”}

FAILED: test
org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32603,"message":"Cannot navigate to invalid URL"}
(Session info: chrome=49.0.2623.105)
(Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 180 milliseconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: 'HSNMM-KhyatiS', ip: '10.50.33.63', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_79'
Session ID: 805809dc0b6156ce969fb10e0e95c2a5
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{platform=ANDROID, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={}, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=49.0.2623.105, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, hasTouchScreen=true, applicationCacheEnabled=false, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)

Continue reading “FAILED: test org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {“code”:-32603,”message”:”Cannot navigate to invalid URL”}”

JavaScript elements handling in selenium

As we see most of the applications are moving towards development with Angular, React, Aurelia, JS, TS bases scripting language and framework which uses these scripting languages.

When it comes to Quality assurance there is still some project which has not adopted a new framework based on these scripting languages.

For those, we have to interact with the JavaScript element multiple times just to make a tweak in the code. As DOM is very responsive and GUI is fragile we need to make those adjustments in the code. Here are some ways via which we can carry out that in a project which uses Selenium and Java together.

Continue reading “JavaScript elements handling in selenium”

Getting started with the protractor

As an automation QA Engineer,  I always try to work on areas where I can work with pace and efficiency, technology doesn’t matter. As the world is moving towards scripting language We as a QA also work together.

I am talking about the AngularJS, ReactJS applications which are highly acceptable and readily used in today’s world be it a Banking app or a CRM based. One can connect to all the application with frontend as a JS app and backend can be anything C# , Java ,etc. Here the role of QA is to identify the best fit he/she can apply to quickly automate all the cases in a highly compatible language which supports the Frontend application.

Here, I am talking about protractor. For one of my applications which is written in Aurelia (FE tool to create an application similar to AngularJS) we decided to work upon protractor, let’s talk about it in this blog how we managed to do it.

When it comes to testing applications, there are two main types of tests one wants to cover: Unit and E2E . End to end usually refers to the QA testing and unit mainly for the developers to take ownership of.

Continue reading “Getting started with the protractor”

Setting loggers in Selenium with log4j

Setting loggers in Selenium with log4j

Imports to make

import java.io.File;
import java.io.IOException;
import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Level;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.RollingFileAppender;
Continue reading “Setting loggers in Selenium with log4j”

How to take screenshots via Selenium.

If we have to prove something to either a developer or a Product owner then we generally we have several ways via which we can actually show the idea to them, but what if whatever you want to show stop working when you actually want to demo it? This is silly, right? But it happens, You have to believe me!!
Continue reading “How to take screenshots via Selenium.”

How to run Selenium tests in headless mode.

Quick, pace, speed are some synonyms that describe us. We, humans, want pace in each and every act of ours. We want to speed up things as much as we can do. So we try experimenting with things as we try to search for betterment of work, as we are growing in automating things, replacing human acts to programs or machinery.

If I talk about selenium, then the major time which is spent in the framework is at execution. And if I go one step deeper then the initial point where the execution takes time is when it is trying to open browser be it Chrome, IE, or any other. So just to wipe out this pain point there is one such browser that works in headless mode and is compatible with selenium as well.

Continue reading “How to run Selenium tests in headless mode.”

Part 2 – Resolution of some major-frequently-seen Selenium utilities.

This blog is a continuation of my previous blog . Here I am collating the data according to my own experience. These methods can be added in the Utility class directly to make wide use of different functionalities.


How to verify current page and expected page in selenium?

Continue reading “Part 2 – Resolution of some major-frequently-seen Selenium utilities.”

Part II – One step deeper into Page Object Model.

As we have already discussed in my last post on page object model, why we need design patterns while coding. In this post, lets see what all pre-requisites are required to get a quick start so that we can get a better understanding of POM aka Page Object Model:

  1. The functionality classes (PageObjects) represent a reasoned common lineage between the pages of the application.
  2. The Page Object pattern act for the screens of your web app as a sequence of objects.
  3. It encapsulates the characteristics represented by a page.
  4. It permit us to mock-up the UI in our tests.
  5. A page object is an object-oriented class that work as an interface to a page of your AUT.
Continue reading “Part II – One step deeper into Page Object Model.”

Part 2-API testing with rest assured.

API testing with rest assured

In continuation with my previous blog, here I will be sharing some basic rest services methods implementation like POST, GET etc.

api

REST in itself without exception has a lot to learn. It has helped the whole team of developers and QA to evolve and mobilise their work as much as possible.

By providing whole lot of the methods like GET, POST, PUT, DELETE, PATCH, etc one can traverse the whole code. Not just fetching, or updating, one can even delete then store and use one data in one and another form. Thus making a complete round of testing and development done.

Like REST java also helped in making this dynamic thing more super, lets see how.

Continue reading “Part 2-API testing with rest assured.”

Part 1 – Resolution of some major frequently seen Selenium utilities.

This blog will only focus on areas in which coders usually search over the web. Here I am collating the data according to my own experience. These methods can be added in the Utility class directly to make wide use of different functionalities.

This blog will only focus on areas in which coders usually search over the web. Here I am collating the data according to my own experience. These methods can be added in the Utility class directly to make wide use of different functionalities.

Continue reading “Part 1 – Resolution of some major frequently seen Selenium utilities.”

at org.openqa.selenium.firefox.internal. NewProfileExtensionConnection.start

There are several phases in a tester’s life starting from working in a team to making an automation framework. Along with this he/she has to make sure the integrity of the work-test life-cycle.

There are several phases in a tester’s life starting from working in a team to making an automation framework. Along with this he/she has to make sure the integrity of the work-test life-cycle.

Today in this blog post I will share a problem that will come when people who have to work on a framework who was made by someone else and he/she has to maintain and extend it.

Continue reading “at org.openqa.selenium.firefox.internal. NewProfileExtensionConnection.start”

Helium .. a boon or not to all automation engineers?

‘Selenium’ is the hot topic in the automation sector, if any developer or tester knows Selenium well, then it is considered as he can do anything which is required to perform ‘Web automation’. Its been almost a decade when Selenium came up to the market, and as time passed it became more and more popular. People started taking it more seriously. Not only as a stand-alone tool, merely with the combination of other tools like Maven, Jenkins, TestNG, etc.

Though the work goes on, and people started taking more interest in this automation area, people started finding flaws in this tool. However some were very genuine, on the contrary, some seem to make less sense.

Continue reading “Helium .. a boon or not to all automation engineers?”

Resolution of some major Errors/Exception which users face while working with Selenium Grid.

1. failed configuration: @beforemethod setup org.openqa.selenium.webdriverexception: error forwarding the new session empty pool of vm for setup capabilities.

Resolution : https://khyatisehgal.wordpress.com/2014/08/27/failed-configuration-beforemethod-setup-org-openqa-selenium-webdriverexception-error-forwarding-the-new-session-empty-pool-of-vm-for-setup-capabilities/

Continue reading “Resolution of some major Errors/Exception which users face while working with Selenium Grid.”

FAILED CONFIGURATION: @BeforeMethod setUp org.openqa.selenium. WebDriverException: Error forwarding the new session Empty pool of VM for setup Capabilities


[TestNG] Running:
C:\Users\user\AppData\Local\Temp\testng-eclipse-2068414740\testng-customsuite.xml

FAILED CONFIGURATION: @BeforeMethod setUp
org.openqa.selenium.WebDriverException: Error forwarding the new session Empty pool of VM for setup Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}]
Command duration or timeout: 200 milliseconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'ksehgal', ip: '192.168.0.162', 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)
Continue reading “FAILED CONFIGURATION: @BeforeMethod setUp org.openqa.selenium. WebDriverException: Error forwarding the new session Empty pool of VM for setup Capabilities”

Listening on port 32052:Exception in thread “main” org.openqa.selenium.remote. SessionNotFoundException

ERROR

Started InternetExplorerDriver server (32-bit)
2.42.0.0
Listening on port 32052
Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.21 seconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'ksehgal', ip: '192.168.14.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_67'


And some more stack trace

Continue reading “Listening on port 32052:Exception in thread “main” org.openqa.selenium.remote. SessionNotFoundException”