Error: The update-config.json file could not be located in Protractor

I recently converted my Cucumber tests to TypeScript and started running them with Protractor. When I run the tests from the command-line using the following commands:

rimraf cucumber/build && tsc -p cucumber && protractor cucumber/build/protractor.conf.js 

Everything works fine, the tests run successfully without any issues. However, when I try to move these commands into a script within the package.json file like this:

// package.json
...
"cucumber": "rimraf cucumber/build && tsc -p cucumber && protractor cucumber/build/protractor.conf.js"
...

I encounter an error that says:

[13:54:55] I/launcher - Running 1 instances of WebDriver
[13:54:55] I/direct - Using ChromeDriver directly...
[13:54:55] E/direct - Error code: 135
[13:54:55] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
[13:54:55] E/direct - Error: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.

As someone who is new to Protractor, Cucumber, and Selenium, I am unsure how to resolve this issue. I have attempted to run the update command as suggested but it hasn't made a difference.

Below is a snippet of my protractor.conf.ts file for reference:

import { Config } from 'protractor';

export let config: Config = {
  // configuration settings here
};

If anyone has some guidance or can offer assistance, it would be greatly appreciated.

Answer №1

This method is specifically designed for utilizing npm scripts. By defining the cmd within the scripts block in the package.json, npm will search for the executable binary specified in cmd from the local package folder of the project, located at

<folder of package.json>/node_modules/.bin
.

If you directly enter and execute

protractor cucumber/build/protractor.conf.js
in the cmd window, the executable binary - protractor in this case - will be sourced from the PATH environment variable, rather than the project's local package folder.

This distinction underscores the importance of locating the executable binary within the scripts section of the package.json file as opposed to omitting it altogether.

To troubleshoot the issue at hand, it is recommended to run webdriver-manager update for the local project package. This action will result in the creation of an update-config.json file within the project's local package directory.

"cucumber": "rimraf cucumber/build && tsc -p cucumber && webdriver-manager update && protractor cucumber/build/protractor.conf.js"

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

Issue detected in rxjs-compat operator's shareReplay file at line 2, column 10:

I've encountered an issue with the angular material spinner I'm using in my project. The error message is as follows: ERROR in node_modules/rxjs-compat/operator/shareReplay.d.ts(2,10): error TS2305: Module '"D:/ControlCenter/ofservices ...

Tips for managing a dialog box that only has a close button in Selenium using Java

Currently, I am in the process of automating a website that has a "submit" button triggering a dialog box. Within this dialog box, I need to click on an "update" button. However, my code does not proceed to open the dialog box after clicking the "submit" ...

What is the best way to grasp the connections between the any, unknown, {} data types and their relationships with other types?

Seeking to comprehend relationships between different types, the following code is presented: type CheckIfExtends<A, B> = A extends B ? true : false; type T1 = CheckIfExtends<number, unknown>; //true type T2 = CheckIfExtends<number, {}> ...

Using Selenium with JavaScript and Python to simulate key presses

Is there a way to simulate key presses as if typing on a keyboard? I am looking to programmatically click on an input element and then emulate the user typing by pressing keys. I prefer not to use XPath selectors combined with sendkeys or similar methods. ...

Refresh Angular page data following new routing paths

The chat box page in the image below was created using Nebular: Nebular Documentation View Chat Box Photo After clicking on one of the user names (2) from the list, the URL ID (1) changes but the corresponding data does not load. Note: I have created a m ...

TS will not display an error when the payload is of type Partial

Why doesn't TypeScript throw an error when making the payload Partial? It seems to only check the first value but not the second one. type UserState = { user: User | null; loading: boolean; error: Error | null } type UserAction = { type: type ...

Creating Algorithms for Generic Interfaces in TypeScript to Make them Compatible with Derived Generic Classes

Consider the (simplified) code: interface GenericInterface<T> { value: T } function genericIdentity<T>(instance : GenericInterface<T>) : GenericInterface<T> { return instance; } class GenericImplementingClass<T> implemen ...

Attempting to create a TypeScript + React component that can accept multiple types of props, but running into the issue where only the common prop is accessible

I am looking to create a component named Foo that can accept two different sets of props: Foo({a: 'a'}) Foo({a: 'a', b: 'b', c:'c'}) The prop {a: 'a'} is mandatory. These scenarios should be considered i ...

Exploring ways to interact with Span elements using Selenium in Python

Greetings! I am currently attempting to access a specific element called span. My goal is to retrieve this element in a manner that allows me to append it to a list. Each span contains an attribute wordnr="1" or a different number. The objective is to extr ...

What are some creative ways to emphasize certain dates?

Is there a way to customize mui-x-date-pickers to highlight specific days from a Date array with green filled circles around them? I am using new Date and wondering how to achieve this effect. Below is the code snippet I am currently working with: <Dat ...

determining the position of the substring located within an "if any" function

I have two lists A and B. My goal is to extract a string from list A, find a matching string in list B, and then determine the index of that matching string in list B. I've attempted several nested loops without success. I haven't come across an ...

An error occurred as the Serverless Function timed out while attempting to load a dynamic route in Next.js version 13

I have a basic Next.js application with the following route structure: /contentA/ - Static - Initial load: 103 kB /contentA/[paramA]/groups - SSG - Initial load: 120 kB /contentB/[paramA]/[paramB]/[paramC] - SSR (client component) - Initial load: 103 kB ...

The test results differ depending on the browser used - it fails when executed in web

When a new user signs up, this code allows the process to be carried out successfully. It switches the Capybara driver to Selenium, visits the homepage, clicks on the 'Sign up' link, fills in the required information for the user, and submits the ...

Fixture in Py.test: Implement function fixture within scope fixture

I've encountered a small issue with pytest fixtures and I could really use some assistance. Below are some function fixtures without their implementation details for brevity. @pytest.fixture() def get_driver(): pass @pytest.fixture() def login( ...

What is the appropriate event type to pass to the onKeyPressed function in a React application utilizing MaterialUI and written with Typescript?

I am currently working on a React application using Typescript and MaterialUI, where I have implemented a TextField component. My goal is to capture the value of the input HTML element when the user presses the enter key. To achieve this, I have created ...

When setting up Webpack with TypeScript, an error is encountered related to imports

Recently, I attempted to convert my Webpack configuration from JavaScript to TypeScript but encountered numerous difficulties in the process. To kick things off, I created a basic webpack configuration file with some parts missing. Here is how my webpack.c ...

Using JSDoc to Include TypeScript Definitions

I've been attempting to utilize the ts-xor package, which provides a TypeScript definition: export declare type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U; This is how I'm imp ...

Can you provide a guide on setting up and utilizing mathlive within NuxtJS?

Can anyone assist me? I am trying to figure out why my code is not working or if I have implemented it incorrectly. I used npm i mathlive to obtain input. However, following the instructions for implementing nuxt plugins in the documentation has not yield ...

How to Click a Button Using Selenium without Specifying ClassName or ID

I am working on a project related to Browser Automation, but I'm encountering issues with clicking a specific button. I attempted the following steps: webDriver.FindElement(By.XPath("//*[@id='uploadForm: fileup']/div[1]/button[1]")).Click() ...

Tips for creating a sequelize transaction in TypeScript

I am currently working with sequelize, node js, and TypeScript. I am looking to convert the following command into TypeScript. return sequelize.transaction().then(function (t) { return User.create({ firstName: 'Homer', lastName: ' ...