Skip to content

Conversation

@nohwnd
Copy link
Member

@nohwnd nohwnd commented Feb 22, 2023

Running Playwright.Main(new [] { "install" }) shows console window in WPF app, which does not show in normal test. In normal test we are already running under existing conhost which is started as hidden so we don't show extra window. In WPF app that uses WinExe and has no existing conhost a new console is shown for playwright.cmd. This PR makes sure that the window is hidden.

Fixes #2462

Running Playwright.Main(new [] {install}) shows console window in WPF app, which does not show in normal test. In normal test we are already running under existing conhost which is started as hidden so we don't show extra window. In WPF app that uses WinExe and has no existing conhost a new console is shown for playwright.cmd. This PR makes sure that window is hidden.

Fixes microsoft#2462
@nohwnd
Copy link
Member Author

nohwnd commented Feb 22, 2023

Not sure how to write a test for this, without it being super heavyweight, you will have to believe me I guess:

BEFORE:

image

AFTER:

image

@nohwnd
Copy link
Member Author

nohwnd commented Feb 22, 2023

@mxschmitt please advise on the driver failure. I guess I can just push the version up to 1.31.0? But is that something you see often?

@nohwnd
Copy link
Member Author

nohwnd commented Feb 22, 2023

Okay so apparently this would partially #2451, which in turn was breaking progress from installation (because it was not inteactive anymore), and would not correctly forward the output.

WindowStyle Hidden also does not work, becuase it has no effect.

So unless progress stops requiring interactive shell there is no solution.

@nohwnd nohwnd closed this Feb 22, 2023
@jozkee
Copy link
Member

jozkee commented Jun 23, 2023

WindowStyle Hidden also does not work, becuase it has no effect.

FWIW we added support for WindowStyle with UseShellExecute = false on dotnet/runtime#82662.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Console window appearing over WPF Application v1.30

2 participants