Rayrun
← Back to Discord Forum

Hello folks, can Playwright read an instructions file and perform operations / record actions ?

can Playwright read an instructions file and perform operations / record actions ? Also does Playwright has a customer care which can be contacted ?

This thread is trying to answer question "Can Playwright read an instructions file and perform operations / record actions? And can it be contacted for customer support?"

8 replies

I don’t think so. Unless your file is a playwright test.

Playwright is open source so there is no dedicated support.

Thanks for your reply @skorp32 . so if i want playwright to test, then I myself have to read the instructions and run it once and then run that playwright file. ?

another doubt I had was it is always opening incognito window

is there a way to do it in normal browser as federated user actions r not workin

it is only taking userid/pwd login approach

One way to avoid running a browser in incognito mode would be to launch your own browser and attach to it.

There is a reason though for using fresh browser contexts for each test by default. It's to prevent that tests will interfere with each other. One test leaving the frontend in a bad state can otherwise break all the next tests.

There are ways to login once, save the authentication state, and then to re-use it for all the tests. It's not guaranteed to work for all apps (it relies on saving/restoring cookies and local storage) but may be interesting to try. Here's some howtos on authentication: https://playwright.dev/python/docs/auth

can Playwright read an instructions file and perform operations / record actions ? Not sure I understand your question correctly. Scripts and tests are 'instruction files'. So if I interpret it that way, yes, Playwright can execute instructions.

And Playwright also has a recorder. https://playwright.dev/python/docs/codegen-intro#running-codegen

It's also integrated in the inspector, so when running tests in debug mode, you can run the test up to some point and then record some new steps. At least, if I'm not mistaking. (No Python experience here) https://playwright.dev/python/docs/debug#playwright-inspector

With the @playwright/test runner in JavaScript/TypeScript, it's even more convenient. There after a test, the browser stays open, and you can use the vscode extension to 'record at cursor'.

Related Discord Threads

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.