Repository navigation
Flutter drive --browser-dimension not working #136109
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.16Found to occur in 3.16Found to occur in 3.16has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versiont: flutter driver"flutter driver", flutter_drive, or a driver test"flutter driver", flutter_drive, or a driver testteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
I am trying to run flutter web test on Chrome, with the following command:
flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/main_test.dart > C:\Automation_test\Report_log\log.txt \
--browser-dimension="1920,1080" \
-d chrome
Expected results
The browser is resized to 1920 x 1080 when start.
Actual results
The browser is NOT resized to 1920 x 1080 when start.
Code sample
Code sample
[Paste your code here]Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[Paste your output here]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.16Found to occur in 3.16Found to occur in 3.16has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versiont: flutter driver"flutter driver", flutter_drive, or a driver test"flutter driver", flutter_drive, or a driver testteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform team
Activity
darshankawar commentedon Oct 9, 2023
Thanks for the report. I verified using a sample app and running using latest versions and observed that passing browser dimension is not taking effect. I tried passing different dimensions, but the browser window size is same:
--browser-dimensionargument:hoantruong commentedon Oct 25, 2023
Could you please help to fix this issue soon @darshankawar?
Thanks very much!
amrgetment commentedon Dec 5, 2024
Yes, I can confirm it still exists on the latest Flutter release 3.24.5
is there any workaround
amrgetment commentedon Dec 5, 2024
@kevmoo Sorry to mention you, but could you look into this issue, it is breaking the visual UI testing(golden testing) for Flutter web
munrocket commentedon Dec 19, 2024
We need to add mobile emulation in dart.
Here same bug with selenium and fix for it.
munrocket commentedon Dec 22, 2024
@amrgetment I am created pull request. You can apply patch to stable Flutter with
git apply patch.diff, don't forget to clean ~/.pub-cache before use, if it is not clean setup.Precise browser resizing with integration_test and driver (#160678)
Precise browser resizing with integration_test and driver (flutter#16…
github-actions commentedon Jun 10, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.ksokolovskyi commentedon Jul 14, 2025
Hi @darshankawar, not long ago this issue was closed as fixed by #160678. While investigating another driver issue on
masterchannel, I noticed that passing--browser-dimensionsdoesn't resize the browser window.I am using
flutter-devto run Flutter Tools from source.With
--browser-dimension='200x300@1'Without
--browser-dimension⠀
Could you please try to reproduce the issue again on
masterchannel? Thanks in advance!