Initiate the Selenium server with Protractor using a specified port

The configuration below is causing the server to start on a different port each time by protractor, rather than the specified port.

exports.config = {
  allScriptsTimeout: 11000,

multiCapabilities: [ {
  browserName: 'chrome',
  shardTestFiles: true,
  //seleniumAddress: 'http://localhost:4444/wd/hub',
  seleniumServerJar: './node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.4.0.jar',
  seleniumPort: 4455,
  seleniumArgs: ['-browserTimeout=60']
  }
]
}

Output:

[11:06:47] I/local - Starting selenium standalone server...
[11:06:48] I/local - Selenium standalone server started at http://127.0.0.1:60315/wd/hub

Expected result is for the server to be launched on port 4455.

Answer №1

Here is the code snippet you can try:

seleniumServerJar: './node_modules/protractor/node_modules/webdriver-
               manager/selenium/selenium-server-standalone-3.4.0.jar',

localSeleniumStandaloneOpts:{
         port: 4455,
         args:['-browserTimeout=60']

       }  


multiCapabilities: [ {
    browserName: 'chrome',
    shardTestFiles: true,
  }
]}

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

Storing an image or video file to the disk of a NodeJS server and creating a reference in MongoDB

Seeking advice on the optimal method to store an image or video file on a NodeJS server and link it to MongoDB. Additionally, I need to enable streaming for the videos. Any recommendations would be greatly appreciated. Thank you! ...

Is there a way in MVC3 / .net4 to convert a JSON formatted JavaScript array into a C# string array?

I am facing a challenge with my MVC3/.Net service where it is receiving arguments in the form of a JSONified Javascript array. I want to convert them into a C# array of strings. Is there a built-in solution available for this task, or do I need to create ...

What is the best way to use html, css, jquery, and bootstrap to show or hide images without any extra space or alignment issues

I am looking to showcase 6 images on a page using the Bootstrap grid layout. The images should be displayed in two rows, with 3 images in each row. Additionally, I want to implement a filter functionality using Isotope, so users can click on a specific cat ...

What is the best way to send multiple requests until one is successful in Node.js without causing delays?

My situation involves a function that requires a parameter and a callback. This function is responsible for making a request to an external API in order to retrieve information based on the parameter provided. The challenge arises when the remote API occas ...

Naming conventions for MongoDB documents

After numerous attempts, I am still puzzled as to why the document name in MongoDB is showing as User.js every time I save data. Here is the code snippet: const mongoose = require("mongoose"); const Schema = mongoose.Schema; const userSchema = new Schema( ...

How can you efficiently pass the index as a prop to a child component in React.js when dealing with arrays stored in

Just starting out with React, so bear with me if my terminology is a bit off. I'm working on a table that displays a list of people in a specific order. I want to be able to assign a this.props.tablePosition value based on the index of each person. t ...

What is the simplest way to extract only the error message?

Having this code snippet. $('div#create_result').text(XMLHttpRequest.responseText); If we look at the content of XMLHttpRequest, it shows: responseText: Content-Type: application/json; charset=utf-8 {"error" : "User sdf doesn't exist"} st ...

Leveraging the power of selenium's CSS selector for various elements

In my Perl script, I have multiple lists of links that can collapse and expand. To determine the total number of links in a list, I am using the get_xpath_count('//li/a') function. The challenge I am facing is how to extract the actual names of ...

What is the best way to create a dynamic graph in amcharts during runtime?

Below is the code for Multiple Value Axes: In this code, we aim to display a graph using dynamically generated random data. When executed, nothing will happen. <script> var chart; var chartData = []; // generate some random data within a different ...

"Exploring the possibilities of the Raphael JavaScript Library on an iPhone

I've been trying to integrate the Raphael JavaScript library into my iPhone project, but I'm running into an issue with getting it to work in a webview. On Safari for Mac, everything seems fine and I can see the red circle as expected. However, w ...

Can a javascript variable be accessed after loading an iframe and returning to the page?

Using a jquery plugin known as colorbox, my colorbox simply opens an iframe on the screen. This detail may not be relevant, as the core issue at hand is that I have 3 variables on my parent window that are retrieved from an AJAX call using jquery: data.re ...

Is it possible to automatically reload the previous link when the back button of the browser is clicked?

I am working on a website where the main content is loaded using jQuery Ajax based on the selected menu item. When a menu item is selected, the URL changes according to this pattern: http://host/domain/index.php?pageid=page In this scenario, the 'p ...

Error: Configuration setup failed with a NullPointerException in @BeforeMethod

I am encountering an issue with the code I've written for designing a framework. Every time I run the program, I get the following error message. Can someone please assist me in resolving this problem? "[RemoteTestNG] detected TestNG version 7.0.1 FAI ...

Is it advisable to utilize IDs for element location?

Recently dove into Angular and Protractor. I can't help but feel hesitant about relying on complex CSS selectors that could easily break with the slightest tweak. Using IDs seems like it would simplify testing tremendously. Although I haven't ...

Utilizing watcher with computed property in TypeScript VueJS: A comprehensive guide

I'm in the process of creating a unique component that permits the use of any <div> elements as radio buttons. Here is my current code implementation: <template> <div class="radio-div" :class="selected ? 'select ...

Why should <template> be used in Vuetify?

Exploring the possibilities of Vuetify 2.0 in my current project has led me to dive into the v-stepper component, designed for displaying progress through numbered steps. In the example provided in the playground, I noticed the use of the <template> ...

Converting numbers in React Native, leaving only the last four digits untouched

When mapping biomatricData.ninId, the value I am receiving is "43445567665". biomatricData.ninId = 43445567665 My task now is to display only the last 4 digits and replace the rest with "*". I need to format 43445567665 as follows: Like - *******7665 ...

Retrieving data from controllers and passing it to directives in Angular applications

I have integrated a directive into my Angular website to generate a customized page header. Within this header, I aim to display the user's first and last name. My application is enclosed within a MainController. Below is the rendered HTML: <html ...

Executing numerous GET requests with varying parameters in AngularJS

Update: My apologies to those who answered, it turns out that the code was correct, but requests were being intercepted and losing all parameters. I am attempting to send repeated HTTP GET requests to a REST API based on the response, using the solution I ...

Obtain the ClientID for a particular user control that is within a repeater's bindings

I have a collection of user controls that I am connecting to a repeater. The user control: (Example) "AppProduct" <div> <asp:Button ID="btn_details" runat="server" Text="Trigger" /> <asp:HiddenField ID="pid" ...