What is the method for utilizing a parameter in a protractor configuration file to select specific steps?

After reading this particular question, I attempted to implement the following:

protractor test/features/protractor-conf.js --params.test_set=dev_test

as well as

protractor-conf.js:

exports.config = {
   // ...
  specs: [browser.params.test_set+'/*.feature'],

However, this approach did not work as browser is not defined during the parsing of the conf file.

So, I am left wondering how I could achieve the desired effect of passing a parameter to protractor that determines the specs to be used.

Answer №1

To specify which files to test, you can use the --specs command-line argument:

The --specs argument is used for providing a comma-separated list of files that need to be tested.

protractor test/features/protractor-conf.js --specs=dev_test/*.feature

It's important to note that the path dev_test/*.feature will be passed into Protractor's command-line interface, which will then resolve the paths based on the current working directory (source code).

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

How can a child value be transferred from a client component to a parent component on the server side?

I am facing a situation where a client-side component needs to send a value to its parent component which is server-side. I have tried using useState and other hooks, but so far it has been unsuccessful. Can anyone provide guidance on how to achieve this? ...

Looking for a way to update template variables in copy using grunt?

I am currently utilizing load-grunt-config along with grunt-contrib-copy. My objective is to have the copy task replace certain template tags using the 'process' option. I understand that replacing template tags is feasible based on the grunt-co ...

What is the best way to update a CSS class in React JS?

Suppose I have a CSS class called 'track-your-order' in my stylesheet. Whenever a specific event occurs, I need to modify the properties of this class and apply the updated values to the same div without toggling it. The goal is to replace the ex ...

What is the best way to turn off autocorrect in a textarea on IE11 without turning off spellcheck?

In my experience, disabling the spellcheck attribute seems to solve the auto-correct issue, but it also eliminates the underlining of misspelled words. <textarea id="TextArea1" spellcheck="false"></textarea> I prefer to keep spellcheck enabl ...

Icons are failing to display in the dropdown menu of MUI after an option is selected in ReactJS

There seems to be an issue with the icon in the select tag. Initially, it is not showing which is correct. However, when you click the dropdown, the icon appears as expected. But after selecting an option, if you click the dropdown again, the icon disapp ...

Display a loader while waiting for an API call to complete within 5 seconds using Angular and RxJS operators. If the API call takes longer

We are actively working to prevent user blockage during file uploads by implementing a method in Angular using RxJS. How can I display a toastr message and hide the loader if the API does not complete within 5 seconds? uploadFile() { this.service.uploa ...

The type 'Observable<any>' cannot be assigned to the type 'Observable<T>'

Here is the code I am working with: import {HttpClient} from '@ngular/common/http'; private httpClient: HttpClient; do_request(method: string, url: string, ...

Is there a discrepancy in performance when running a function on an individual element versus a group of elements within jQuery?

Imagine having the choice between applying a function to an individual DOM element or a list of them: For Individual Elements: $('#element1').click(function () { $(this).hide(); return false; }); $('#element2').click(functi ...

`Evaluating the functionalities of AngularJS using Protractor`

Currently, I'm in the process of developing an AngularJS app and have been tasked with incorporating automated testing into our workflow. This is a new concept for me, so it's taking some time to fully grasp. After much consideration, I've ...

Configuring Access-Control-Allow-Origin does not function properly in AJAX/Node.js interactions

I'm constantly encountering the same issue repeatedly: XMLHttpRequest cannot load http://localhost:3000/form. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefor ...

Utilizing a particular iteration of npm shrinkwrap for project dependencies

When deploying my node.js app to Appfog, I encountered a problem with their install script failing to parse npm-shrinkwrap.json. The current format of a dependency in shrinkwrap.json is as follows: "async": { "version": "0.2.10", "from": " ...

What is the method for selecting a specific row in a Primefaces Datatable using HtmlUnitDriver and Selenium?

Check out this code snippet: import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriv ...

Searching the price data in the price field using Node.js and Express

Can someone assist me with querying the price? I am currently struggling with my attempt and unsure about what needs to be entered in the local host. http://localhost:3000/priceSearch? I have implemented - orderSearch.find({price:{$gt:400, $lt: 700}}) T ...

Javascript does not have the capability to interact directly with HTML code

I am facing an issue with my JSP code that is supposed to validate password and confirm password before submitting the form to a Java servlet. The problem is, even though I have written the validation script, it does not show alert messages or focus on t ...

Perform individual conditions (filters) sequentially within a MongoDB query

Currently, I am working on a query that involves using $and to apply multiple filters or conditions. While explaining the query, I realized that $and does not function in the same way as the JavaScript && operator. How can I simulate JavaScript && functi ...

Struggling to remove a row from the MUI DataGrid within a MERN CRUD application with Redux/RTK?

Struggling to understand why the delete button isn't working on my Material UI (MUI V5) Data Grid table. As a beginner in coding, especially with MERN and Redux, my mind is overwhelmed after trying various solutions all weekend - Google, Stack Overflo ...

What is the correct way to utilize $sce.trustAsHtml(string) in Angular 1.2 and later in order to mimic the functionality of ng-bind-html

ng-bind-html-unsafe has been removed in the latest version of Angular, 1.2. I'm currently working on a feature that requires the use of ng-bind-html-unsafe. According to both the documentation and the github commit, they mentioned: Using ng-bind-h ...

``Changing the value of the radio button does not update the ng-model variable

I have encountered an issue with my code. Upon page load, the radio button is checked but the ng-model value session.payment does not get updated automatically. I have to manually select it again for the update to take effect. <li ng-repeat="method i ...

Collect text from clipboard only during the initial iteration of the loop

I am encountering an error that I can't seem to figure out. No exceptions are being thrown. My task involves copying text using the Robot class. // mark the text robot.keyPress(KeyEvent.VK_CONTROL); robot.keyPress(KeyEvent.VK_A); robot.delay(1000); ...

Module specifiers that are considered relative must always commence with either "./", "../", or just "/"

I need help with importing three.js. I have been following the documentation but I keep encountering an error message: Uncaught TypeError: Error resolving module specifier “three”. Relative module specifiers must start with “./”, “../” or “/ ...