-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] website does not extend to full size #813
Comments
👋 @bpasero That would be set on the browser.newContext level: const { chromium, firefox, webkit } = require('playwright');
(async () => {
const browser = await chromium.launch({ headless: false });
const context = await browser.newContext({ viewport: null });
const page = await context.newPage('https://visualstudio.microsoft.com/services/visual-studio-online/');
})(); We'd like users to create a browser context per test and all the configurations would go there. We can't make |
Hi @pavelfeldman, I would if possible try to not create a new context but use the tab that opens by default to reduce the number of things that open. My current code to run is this: const browser = await playwright[engine].launch({
headless
});
const page = (await browser.defaultContext().pages())[0];
await page.setViewport({ width, height });
await page.goto(`${endpoint}&folder=vscode-remote://localhost:9888${URI.file(workspacePath!).path}`); Ideally I could have a setting to simply fill the view port. |
Got it. Just testing the waters here: would it work for you if defaultContext was not opening its first page? Rationale: default context is extremely limited in the emulations that you can apply and can't be used in the cloud scenario - we want to maintain a 'context per user story' operation. |
@pavelfeldman yeah I think that would work. Summarising my requirements:
|
I believe this is now possible! |
solution with |
Same question here, Team, Do we have any options to open the browser in full screen size? thanks |
use '--window-position=0,0' in args and capture the current viewport using pyautogui or any other python library, which will properly maximize the browser window in playwright python |
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Leaving this here since I found this issue when searching for viewport issues with python playwright. |
Context:
I wonder how to get my app span the entire window?
I experimented with passing over viewport, but I am not sure that is correct. I simply want the viewport of whatever the browser window size is.
The text was updated successfully, but these errors were encountered: