Rayrun
← Back to videos

How To Test Mobile & Desktop Browser? Playwright tutorial - Part 73

Playwright Test supports running multiple test projects at the same time. This is useful for running the same or different tests in multiple configurations.

The video is a tutorial on how to use the "projects" feature in Playwright to run cross-browser tests. The video starts with an introduction to the concept of cross-browser testing and the need to run the same test script with multiple browsers. It explains that Playwright allows for the emulation of different browsers and devices, such as Chromium, Firefox, WebKit, and mobile web pages.

The tutorial then demonstrates how to set up projects in Playwright by using an array of browser configurations. The video shows how to configure multiple browsers to run in parallel using the "workers" option. It also explains that tests can be executed sequentially or with a specific number of workers.

Next, the video highlights the issue of viewport configuration in mobile devices and explains how to handle it. It shows how to check if the viewport is in mobile format and conditionally click on the hamburger menu before performing the desired action. This ensures that the test script works correctly in both desktop and mobile views.

The tutorial also covers how to execute tests in specific browsers or devices using the "project" option in the command line. It provides examples of running tests only in Chromium or only on a specific device.

Finally, the video encourages viewers to refer to the Playwright documentation for further details on retry mechanisms and additional capabilities. It concludes by thanking viewers and inviting them to watch the next tutorial.

Overall, the video provides a comprehensive guide on using projects in Playwright to run cross-browser tests and addresses common issues that may arise in mobile device emulations.

Related Videos

#16 - ARIA and how Playwright is making use of it to identify UI controls?
#16 - ARIA and how Playwright is making use of it to identify UI controls?
Playwright - Set timeout, parallelisation and retries directly in your test files
Playwright - Set timeout, parallelisation and retries directly in your test files
Playwright & Lighthouse Integration | Playwright Tutorial - Part 88
Playwright & Lighthouse Integration | Playwright Tutorial - Part 88
Maximize Window | Playwright Tutorial - Part 72
Maximize Window | Playwright Tutorial - Part 72
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 luc@ray.run.