Difficulty encountered while executing Protractor tests with Selenium Server

Attempting to Execute Protractor/Jasmine/Selenium End-to-End Tests

Currently in the process of running end-to-end tests using Protractor with the standalone Selenium server and the chrome driver.

Encountering a Selenium server error when attempting to run tests with Protractor: 14:08:24.188 WARN - Exception: C:\Users\ARM678\AppData\Local\Temp\jna--1409357381\jna1939368593138214681.dll: %1 is not a valid Win32 application

Providing more details below...

Selenium standalone server initiated through command line execution (passing location of chrome web driver):

Command

java -jar selenium-server-standalone-2.52.0.jar -Dwebdriver.chrome.driver="C:\TDAWare\servers\selenium\drivers\chromedriver.exe"

Output (Seems Fine So Far):

14:00:27.695 INFO - Launching a standalone Selenium Server
Setting system property webdriver.chrome.driver to C:\TDAWare\servers\selenium\drivers\chromedriver.exe
14:00:27.845 INFO - Java: Oracle Corporation 25.72-b15
14:00:27.846 INFO - OS: Windows 7 6.1 x86
14:00:27.855 INFO - v2.52.0, with Core v2.52.0. Built from revision 4c2593c
... 

Protractor conf.js file:

exports.config = {
  framework: 'jasmine',
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: ['tdau-homepage-spec.js'],
  allScriptsTimeout: 200000,
  jasmineNodeOpts: {...},
  onPrepare: function() {...}
}

Protractor tdau-homepage-spec.js

'use strict';
describe('My first test suite', function() {
    it('should bring up a web page', function() {
        browser.get('https://internal.tdameritradeu.com/dist');
        expect(browser.getTitle()).toEqual('TD Ameritrade U');
    });
});

Running Test (Issues Arise):

protractor conf.js

Multiple stack traces revealed from both Selenium Server and Protractor. Examination of logs indicates that there may be issues related to the chromedriver.exe creating jna1939368593138214681.dll which Windows struggles with.

From Selenium Server:

Various errors encountered while attempting to create session for ChromeDriver.
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\ARM678\AppData\Local\Temp\jna--1409357381\jna1939368593138214681.dll: %1 is not a valid Win32 application...

From Protractor:

Error message indicating an issue with jna1939368593138214681.dll being an invalid Win32 application during WebDriver session creation.

Troubleshooting Steps Taken:

  • Redownloaded driver to ensure no corruption in zip file
  • Attempted different versions of the driver
  • Unzipped driver with multiple utilities to rule out any corruption

Environment Details:

  • OS: Windows 7 Enterprise (64-bit)
  • chromedriver version: 2.21 (also tried v.2.16)
  • node version: 4.2.4
  • npm version: 3.7.5

Note: Google confirms only a 32-bit version of the Chrome driver available, compatible with 64-bit systems as well.

Answer №1

It seems that your configuration file is missing the capabilities section. You must specify which driver to use by adding browserName: 'chrome'.

exports.config = {
  framework: 'jasmine',
  seleniumAddress: 'http://localhost:4444/wd/hub',
  capabilities: {
    browserName: 'chrome'
  },
  specs: ['tdau-homepage-spec.js'],
  allScriptsTimeout: 200000,
  jasmineNodeOpts: {
        defaultTimeoutInterval: 200000,
        showColors: true,
    print: function() {}
  },
  onPrepare: function() {
      var SpecReporter = require('jasmine-spec-reporter');
      jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: 'all'}));
   }
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The persistence of req.session in express-session seems to be unreliable

I am facing an issue with my current code implementation. Here is the snippet: var express = require('express'); var cookieParser = require('cookie-parser'); var http = require('http') var app = express(); app.use(cookieParse ...

Activate trust proxy in Next.js

When working with Express.js, the following code snippet enables trust in proxies: // see https://expressjs.com/en/guide/behind-proxies.html app.set('trust proxy', 1); I am attempting to implement a ratelimit using an Express middleware that is ...

Creating a secure Node.js server using `https.js` is a great way to ensure the safety of

Currently in the process of setting up a secure server for my node.js application by utilizing the https.js NPM module. app.js: var http = require('https'), fs = require('fs'); var cert = { key: fs.readFileSync('/opt ...

Pandas seems to be struggling, as it can only retrieve one table out of the five tables available when reading

My goal is to utilize selenium for scraping tables from the following weblink. However, I am encountering an issue where pandas is only returning the first table and not all of them. weblink = 'http://sgx.com/wps/portal/sgxweb/home/company_disclosure ...

Having trouble with accessing an element that contains both onclick and text attributes in Selenium Webdriver?

The HTML code I'm dealing with includes this element: <a style="text-decoration:none; font-weight:normal;" href="javascript:void(0);" onclick="CreateNewServiceItemApproved();"> <img src="icons/ui/addnew.png"> <span style="color:# ...

Model calculates product of two columns using Sequelize

Is it possible to multiply the quantity and unit columns from a table using sequelize's findAll method? Products.findAll({ attributes: [ 'id', 'Product', 'Quantity', ' ...

Implementation of async operations using while loop in Node.js

I'm facing an issue with my code snippet. Here's what it looks like: Rating.find({user: b}, function(err,rating) { var covariance=0; var standardU=0; var standardV=0; while (rating.length>0){ conso ...

Generate WebStorm run configurations based on the package.json "scripts" section

Within my package.json file, I have the following "scripts" setup. ... "scripts": { "start": "watchify -o lib/index.js -v -d .", "build": "browserify . | uglifyjs -cm > lib/index.js", "test": "jest" } ... With this configuration, I can eas ...

Encountering a "Cannot GET /PATH" error while developing a NUXT application due to a DOT present in

In my nuxt application, I encountered a peculiar issue. When I execute npm run dev, everything functions properly. However, after running npm run build and then npm run start, I face the error message stating cannot GET [path of the page here] I noticed t ...

Error: The AWS Lambda handler is throwing a TypeError, indicating that the callback must be a function

I clicked on the link: How Can I create an AWS Lambda Script for Running a Protractor / Selenium Browser Automation Script? Instead of implementing my own code, I used the following code snippet in the handler section based on the provided answer: 'us ...

Issue with Angular: PDF rendering delayed until window resize

Recently, I encountered an issue with rendering a PDF in Chrome while using an AJAX call with Angular. Strangely, the PDF would only show up in the browser if I resized the window or opened the console. Surprisingly, everything worked fine in Firefox. Jav ...

The try/catch block proves ineffective at handling a socket connection exception

I am attempting to test connection to a non-existent socket. In this scenario, an exception is thrown and I anticipate it being caught in the try/catch block below. The function createConnection is imported from the net package. try { createConnection( ...

Executing a task utilizing a designated child process in Node.js

Although I'm familiar with forking a child process, my specific requirement involves using this child process to perform certain tasks. For instance, when clicking a button, I need the child process to handle processing form data for saving. This hand ...

Tips for maintaining data in a React component across re-renders?

Currently, I am working on creating a basic axios call to communicate with a nodejs server from a react application in order to retrieve products stored in a mongoose schema model. The issue I am facing is that when the page initially loads, I can successf ...

Express authentication with repetitive login prompts appearing endlessly

Currently, I am in the process of password-protecting my node.js application using http-auth. Numerous individuals have faced similar issues, and I have attempted various solutions to address the problem. However, I seem to be encountering a roadblock. Whi ...

The compatibility between Node JS and Vue JS front-end seems to be glitchy and

I am currently developing a Node JS backend application and Vue JS front-end. In order to authenticate users, I need to implement sessions in the API. For my backend server, I am using the following components: express (4.18.2) express-session (1.17.3) c ...

Having trouble with `npm install socket.io` getting stuck during the node-gyp step

As I wanted to incorporate `socket.io` into my `node.js` application, I opted to utilize `npm` for the installation process. By simply inputting `npm install socket.io -g` in my terminal, I initiated the installation. > <a href="/cdn-cgi/l/email-p ...

What is the process for retrieving the updated document from the findOneAndUpdate function?

Utilizing MongoDB with Node.js, I installed the MongoDB module using npm install mongodb. I encountered an issue where updating an existing document did not return the updated document; instead, it returned the original one. Even after setting the returnN ...

Utilizing the output from a console.log in a webpage

Although the function I created is functioning properly and successfully outputs the value to my terminal onSubmit, I am facing difficulty in understanding why this code isn't updating my html. router.post('/index', function(req, res, next) ...

Is it possible for a redis client to function without having a redis datastore installed?

Currently in my node web server, I am utilizing the npm module known as redis. Upon executing my code... const client = redis.createClient(); client.on("error", function (err) { console.log("Error " + err); }); client.hmset(["key", "test keys 1", "t ...