Hi everyone !
I recently started to learn about playwright as i was told it was "way better than bs4 and selenium"....
Well actually when i made a basic script, and tested it, no way to make it work.
i get (ERROR tests/test_search.py::test_basic_duckduckgo_search[chromium] - playwright._impl._api_types.Error: Executable doesn't exist at C:\Users\flosr\AppData\Local\ms-playwright\chromium-1071\chrome-win\chrome.exe ). The solutions found on internet to upgrade the robot framework thing are useless. I upgraded everything, but playwright still continues to search by default into a directory that doesnt exist. I also saw that theres another command to be made after this upgrade script to be made but it tells me theres no node to be deleted. This framework is actually unusable.
How can you guys successfully use this ? Thank you in advance for your time !
This thread is trying to answer question "How can you guys successfully use this?"
Thank you for your reply ! theres a long thread, then it tells me Webkit 17.0 (playwright build v1869) downloaded to C:\Users\flosr\AppData\Local\ms-playwright\webkit-1869.
Related Ask AI answer for "What are some best practices for using Playwright for testing?".
To make the most out of Playwright, follow these best practices:
Web first assertions like toBeVisible()
ensure accurate testing. They wait for the expected condition to be met before proceeding. Here's an example:
await expect(page.locator('text="Alert message"')).toBeVisible();
Don't use manual assertions that aren't awaiting the expect statement. Instead, use web first assertions to make sure the test waits for the locator to be present.
For debugging, you have two options:
Install the VS Code extension and run tests in debug mode. This opens a browser window and pauses at the breakpoint.
Run tests with the --debug
flag to use Playwright's built-in inspector.
npx playwright test --debug
The VS Code extension offers test generation and locator suggestions. TypeScript works out of the box with Playwright, providing better IDE integrations.
Use Playwright's configuration file (playwright.config.ts
) to define projects for different browsers or devices.
Update your dependency using npm:
npm install -D @playwright/test@latest
Check the release notes for the latest version and any changes that have been made.
For more tips, check out Mastering Playwright Test Automation: Your Comprehensive Cheat Sheet.
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 [email protected].