Viewports -How viewport sizes affect testing,
Learn how viewport sizes affect website testing, what to check at different screen widths, and how to investigate layout problems. What are viewports.

On this page
- Viewports
- 1. Why Viewport Testing Matters
- 2. Choose Relevant Screen Sizes
- 3. What to Check at Each Viewport
- Layout and alignment
- Navigation
- Text and content
- Buttons and controls
- Forms
- Images and media
- Important user journeys
- 4. A Simple Viewport Testing Workflow
- 5. Example: Testing a Login Page
- 6. Investigating a Viewport Issue
- 7. Common Viewport Testing Mistakes
- Testing only on desktop
- Checking appearance but not functionality
- Testing arbitrary screen sizes
- Assuming viewport testing equals real-device testing
- Frequently Asked Questions
- What is a viewport?
- How many viewport sizes should I test?
- Does testing a mobile viewport guarantee mobile compatibility?
- What should I do when a layout issue appears?
- Next Steps
Viewports
A viewport is the visible area of a webpage in a browser. Its width and height influence how website content is arranged and which elements are visible.
Viewport testing helps you identify layout problems that may appear when users access your website on different screen sizes.

1. Why Viewport Testing Matters
A page that looks correct on a desktop screen may have problems at a narrower width.
For example:
- Navigation items may overlap.
- Buttons may become difficult to use.
- Text may overflow its container.
- Images may extend beyond the page.
- Important content may become hidden.
- Forms may become difficult to complete.
Checking relevant viewport sizes helps you discover these issues before they affect users.
2. Choose Relevant Screen Sizes
Select viewport sizes based on the way people use your website.
Consider these broad categories:
- Desktop: Check the main content area, navigation, forms, and multi-column layouts.
- Tablet-sized screens: Check navigation changes, columns, spacing, and content alignment.
- Mobile-sized screens: Check readability, button visibility, form usability, and horizontal overflow.
These are testing categories, not a claim that every RoboQA workflow supports every device profile or viewport size. Use the viewport options actually available in your testing interface.
3. What to Check at Each Viewport
Layout and alignment
Verify that content stays within the intended page boundaries and that elements remain aligned.
Navigation
Check that navigation remains visible and usable, including any responsive menu behavior.
Text and content
Look for clipped text, overlapping labels, unexpected wrapping, and unreadable content.
Buttons and controls
Verify that important controls remain visible and usable at the selected viewport.
Forms
Check field widths, labels, validation messages, and the visibility of submit buttons.
Images and media
Confirm that images fit their containers and do not cause unintended horizontal scrolling.
Important user journeys
Check whether users can complete key workflows, such as login, search, or adding an item to a cart, at relevant screen sizes.
4. A Simple Viewport Testing Workflow
- Choose a page or user journey to test.
- Identify the viewport sizes available in RoboQA.
- Select a relevant viewport.
- Define the expected page behavior.
- Run the supported test.
- Review the available report and evidence.
- Repeat at other relevant viewport sizes.
- Record and investigate any layout or usability differences.
Keep the test objective clear. For example, instead of saying “check mobile,” specify which page and which elements must remain visible and usable.
5. Example: Testing a Login Page
A login page should allow users to enter their credentials and submit the form at the viewport sizes relevant to your audience.
Check that:
- The login form remains visible.
- Labels and fields do not overlap.
- The submit button remains accessible.
- Validation messages can be read.
- The page does not develop unintended horizontal scrolling.
- The expected login behavior remains consistent.
Adapt the expected behavior to your application's design and requirements.
6. Investigating a Viewport Issue
When a layout problem appears, record:
- The affected page or workflow.
- The viewport size used.
- The element or section affected.
- The expected layout.
- The observed layout.
- Supporting evidence available from the test.
If the issue appears only at one size, compare the page at a nearby supported viewport. This can help narrow down the conditions that trigger the problem.
7. Common Viewport Testing Mistakes
Testing only on desktop
Include narrower viewports when they matter to your users.
Checking appearance but not functionality
A button can look correct but still be difficult to interact with. Check important workflows as well as layout.
Testing arbitrary screen sizes
Prioritize sizes relevant to your audience and the application's responsive design.
Assuming viewport testing equals real-device testing
A viewport changes the browser's visible dimensions. It does not automatically reproduce every property of a physical device, such as touch behavior, operating-system differences, or device-specific browser behavior.
Frequently Asked Questions
What is a viewport?
A viewport is the visible area of a webpage in the browser. Its dimensions affect how responsive layouts are displayed.
How many viewport sizes should I test?
There is no single correct number. Prioritize sizes that reflect your users, your design breakpoints, and your most important workflows.
Does testing a mobile viewport guarantee mobile compatibility?
No. Viewport testing can reveal responsive layout issues, but complete mobile compatibility may also depend on browser behavior, touch interactions, device capabilities, and other factors.
What should I do when a layout issue appears?
Record the viewport, affected element, expected behavior, and observed result. Then investigate the cause and retest after the issue is addressed.
Next Steps
- Run Your First Test to begin a website testing workflow.
- How to Write Effective Test Instructions to define viewport-specific expectations.
- Understand Your First Test Results to review and investigate test outcomes.