question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Relative URLs not working in page.goto() in manually launched chromium instances within playwright-test tests.

See original GitHub issue

Context:

  • Playwright Version: “@playwright/test”: “^1.17.2”
  • Operating System: MacOS developer setup, Linux on Github actions
  • Node.js version: 16
  • Browser: Chromium

Describe the bug

When updating from 1.17.1 to 1.17.2 it seems that in the chromium instances launched using chromium.launch(), relative URLs given to page.goto do not work anymore. Just to make it extra clear: They do work in the page object that is handed to our test code by playwright-test, but do not work in the browser instances that are instantiated “manually” using chromium.launch()

We specify the root URL in playwright.config.ts like this.

const config: PlaywrightTestConfig = {
  testDir: "test/e2e",
  use: {
    headless: true,
    baseURL: "http://localhost:8080",
  }
}
export default config

I’m sorry I’m not at the moment able to spare the time to create a standalone snippet/repo for repeating the issue.

One more thing: PlayWright really rocks! Superb work in all aspects in general.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
raimohanskacommented, Jan 10, 2022

Thanks for the tips!

1reaction
raimohanskacommented, Jan 10, 2022

I’ll see if we can find time for trying to come up with a repro. Thanks anyway!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Regression - chromium browser closes during test or ...
We have ~30 playwright tests that get parameterized to run in both Firefox and Chromium and I validated that everything was working by...
Read more >
In Playwright, can't use page.goto with headless webkit
The test works fine on webkit (desktop), chrome (desktop), firefox (desktop), and android (mobile). The test also works on iOS when not headless ......
Read more >
25090 - BASE tag ignored if original page URL contains http ...
Bug does not occur if the original source URL is "localhost:port/test" -- if I take off the query parameter then everything works fine....
Read more >
Page | Playwright - CukeTest
Page provides methods to interact with a single tab in a Browser, or an extension background page in Chromium. One Browser instance might...
Read more >
Answers to All The Top Questions For Playwright Testing
80+ questions and answers about one of the hottest new testing frameworks around, Playwright! Playwright is a relatively new open source ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found