Rayrun
← Back to Discord Forum

why does running case switch between the two monitors to open the page?

optional518posted in #help-playwright
Open in Discord

When a computer is connected to two monitors, why does running case switch between the two monitors to open the page?

Is it possible to fix a certain monitor to open the page under test?

This thread is trying to answer question "Why does the browser switch between two monitors when opening a page with Playwright, and can a specific monitor be set to open the page?"

6 replies

my computer OS is macos。 M3 pro MBP

Playwright does not control where to open it

@skorp32: So which browser is opened is random behavior?

So which browser is opened is random behavior?

No, it's not random behavior. The Playwright browser behavior is determined by the configuration in the playwright.config.ts file

@samsuthen: But I don't have any configurations for which browser to open

But I don't have any configurations for which browser to open

refactoreric

Hi @optional518 , as far as I understand, you want to control /on which display/ the browser will open.

Which Playwright browser(s) are you using?

What is the current behavior? Does the same browser (Chromium) open on a different display each time? Or do different browsers (Chromium vs Firefox vs Webkit) open on a different display?

I don't think Playwright has any options to control this behavior. I expect this to be browser or operating system behavior. On Mac OS, be sure to check/adjust what is your Main display. https://www.eizoglobal.com/support/compatibility/monitor/multimonitor/macos-monterey/

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].