Fixture.page Method
Specifies the page where all tests in the fixture start.
fixture.page( url ) → this
fixture.page `url` → this
Parameter | Type | Description |
---|---|---|
url |
String | The URL of the webpage at which tests start. |
fixture`Fixture.page`
.page`https://devexpress.github.io/testcafe/example`;
test('Starts at https://devexpress.github.io/testcafe/example', async () => {
/* ... */
});
You can also specify a start page for individual tests with the test.page function that overrides the fixture.page
.
If the start page is not specified, the default URL is about:blank
.
You can use the file://
scheme or relative paths to test web pages in local directories.
fixture`Fixture.page`
.page`file:///${path.join(__dirname, './index.html')}`;
fixture`Fixture.page`
.page`./index.html`;