Selenium, Selenium grid, Testing

How to deal with Internet Explorer issues to make it work via Selenium.

To err is human, well said.

I have been traversing over web what all new things I can explore and share knowledge about, but I can never deny the fact that there is a lot which I can share and talk about. Today I will share how Selenium faces problem  while connecting with Internet Explorer. Lets get started then.

How to use Internet Explorer?

Selenium provided support to Firefox, by default. This is something which the Selenium-creators have done to make our life easier while working with FireFox. Now, how about browsers other than default. Of-course, they understand that Web-UI testing can not be said as completed if it is not tested well on multiple browsers.

For testing your application on Internet Explorer via Selenium, you need to add the internetExplorer.exe into your project. And use this for the invocation of the browser,like this:
Continue reading “How to deal with Internet Explorer issues to make it work via Selenium.”

Advertisements
DataBase Testing, Databases, DB2, Oracle, Postgres

How to deal with the databases when it stops following its own master.

During my experience in testing, I have worked on multiple databases, and I must say if you are working on database direct interaction then you must have encountered issues now and then over various areas.

One of the major issue is when you are dealing with databases having multiple tables and these tables are connected with each other with constraints like foreign keys, primary keys, triggers, stored procedures etc.

Other being, when a database server is used by various team members then you might see issue related to concurrent users. Today in this piece of write-up I will share how can we deal with multiple databases when multiple user is using one database server. In other words, how can we drop the connections in different databases, how can we make it happen via scripts like Shell scripts, etc.
Continue reading “How to deal with the databases when it stops following its own master.”

nodejs, protractor, Uncategorized

SyntaxError: Unexpected token while working with protractor on local machine

 ERROR CODE
D:\Protractor\node_modules\protractor\built\logger.js:76
info(...msgs) {
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (D:\gramLabs\code\Protractor\gramLabs\node_modules\protractor\built\configParser.js:6:18)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)

Continue reading “SyntaxError: Unexpected token while working with protractor on local machine”

Automation, Automation Framework, Exception, Java, java.lang.NullPointerException, Object Oriented, Selenium, Testing, Web Automation, Web Testing

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 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 which will come when people who has 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”

Automation, Selenium, Selenium Errors, Testing

Selenium grid : I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect

Today, in this write-up, I am going to share resolution of an issue which is not a frequent one and will not come rapidly, but yeah I have seen this issue while working with Selenium grid, so I am sharing this with you all.
Continue reading “Selenium grid : I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect”

Agile Testing, Automation, Helium, Quality Analyst, Selenium, Testing, Web Automation, Web Testing

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 the 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 contrary some seems to make less sense.
Continue reading “Helium .. a boon or not to all automation engineers?”

no main manifest attribute, Quality Analyst, Selenium, Selenium Errors, Selenium grid, Test Cases, Test Steps, Testing, Usability Tests, Web Automation, Web Testing

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.”

Selenium, Selenium grid, Testing, TestNG

Varied understanding of TestNg and Selenium grid on distinct lines.

Last week, I have given a session over Selenium grid with one of my colleague. In that session, we have covered various topic related to Selenium grid, and we answered some great questions which were asked from the audience out there. In this blog post, I will share the most relish topic which is TestNG.

I have seen many articles, notes, etc over the comparison of TestNG and Selenium Grid, and in this piece of write-up I will share my own experience of working with both and what all pros-cons both holds.To start with let us start with Selenium grid.

Selenium Grid

It is one of the flavor of widely used web automation tool – Selenium. Selenium comes in different edition, like Selenium IDE, Selenium Remote Control, Selenium Webdriver, and Selenium Grid. Each one has its own unique importance.

Continue reading “Varied understanding of TestNg and Selenium grid on distinct lines.”

Java, Selenium, Selenium grid, Testing, TestNG, Web Automation

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”

Automation, Exception, Internet Explorer, Java, Selenium, Selenium Errors, Selenium grid, Testing, Web Automation, Web Testing

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'

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

eclipse, Exception, Java, Selenium, Selenium Errors, Testing, Web Automation, Web Testing

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

ERROR

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: 'ksehgal', ip: '192.168.14.1', 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)

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

Automation, Functional Testing, Java, Selenium, Selenium Errors

java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1

java.lang.UnsupportedClassVersionError: com/xtr/parallel/QuickTestWinFF :Unsupported major.minor version 51.0 at
 java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at
 java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at
 java.net.URLClassLoader.access$000(URLClassLoader.java:58) at
 java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native
 Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at
 java.lang.ClassLoader.loadClass(ClassLoader.java:306) at
 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at
 java.lang.ClassLoader.loadClass(ClassLoader.java:247) at
 org.testng.internal.ClassHelper.forName(ClassHelper.java:96) at
 org.testng.xml.XmlClass.loadClass(XmlClass.java:78) at org.testng.xml.XmlClass.init(XmlClass.java:73) at
 org.testng.xml.XmlClass.(XmlClass.java:59) at
 org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:543) at
 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at
 com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:17
 9) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:788) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScanneImpl.java:1343) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756) at
 com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647) at  com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at
 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at
 com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at
 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at
 com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at
 javax.xml.parsers.SAXParser.parse(SAXParser.java:395) at javax.xml.parsers.SAXParser.parse(SAXParser.java:198) at
 org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17) at
 org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10) at org.testng.xml.Parser.parse(Parser.java:172) at
 org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:311) at
 org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:88) at
 org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204) at
 org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

Continue reading “java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1”

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.

Error:

[TestNG] Running:
C:\Users\user\AppData\Local\Temp\testng-eclipse-314942106\testng-customsuite.xml
FAILED CONFIGURATION: @BeforeClass setUp
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: '192.168.14.1', 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.”

Exception, no main manifest attribute, Selenium, Testing

No main manifest attribute, in selenium-java-2.42.0.jar

Error Statement


F:\Selenium>java -jar selenium-java-2.42.0.jar -help
no main manifest attribute, in selenium-java-2.42.0.jar

Continue reading “No main manifest attribute, in selenium-java-2.42.0.jar”

Uncategorized

Selenium Grid : Forbidden for Proxy , HTTP ERROR: 403

Command to start Selenium Grid at your local


F:\Selenium>java -jar selenium-server-standalone-2.41.0.jar
Aug 20, 2014 7:44:34 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a selenium grid server
2014-08-20 19:44:35.907:INFO:osjs.Server:jetty-7.x.y-SNAPSHOT
2014-08-20 19:44:35.952:INFO:osjsh.ContextHandler:started o.s.j.s.ServletContextHandler{/,null}
2014-08-20 19:44:35.960:INFO:osjs.AbstractConnector:Started SocketConnector@0.0.0.0:4444

Continue reading “Selenium Grid : Forbidden for Proxy , HTTP ERROR: 403”