Skip to content

Suddenly TypeError: Invalid URL #8364

@arvedjo

Description

@arvedjo

What is your Scenario?

I cannot start a test with a test.page method anymore.

What is the Current behavior?

An error gets thrown with:

ERROR Cannot prepare tests due to the following error:

TypeError: Invalid URL
at Object.

What is the Expected behavior?

The test starts

What is the public URL of the test page? (attach your complete example)

does not apply

What is your TestCafe test code?

import { Selector } from "testcafe";

fixture`Test.page`.page`http://devexpress.github.io/testcafe/example`;

test.page`http://devexpress.github.io/testcafe/blog/`("My test", async () => {
  // Starts at http://devexpress.github.io/testcafe/blog/
});

Your complete configuration file

module.exports = {
  baseUrl: "http://devexpress.github.io",
};

Your complete test report

testcafe chrome 'test.js'
ERROR Cannot prepare tests due to the following error:

TypeError: Invalid URL
at Object. (C:\Users\arhess.gitlab\testcafe\testcafe-uzh-kwf\temp\test.js:3:24)

Type "testcafe -h" for help.

Screenshots

Image

The t.testRun.test.baseUrl entry also seems to be corrupted.

Steps to Reproduce

  1. When adding baseUrl to the config file, the error appears. When leaving it out there is no error

TestCafe version

3.7.1

Node.js version

v20.18.2

Command-line arguments

testcafe chrome test.js

Browser name(s) and version(s)

Chrome 132.0.6834.84

Platform(s) and version(s)

Windows

Other

This problem might have occurred with a node update. Before, everything worked fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    STATE: Issue acceptedAn issue has been reproduced.TYPE: bugThe described behavior is considered as wrong (bug).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions