Write Playwright Tests in Seconds with ChatGPT!?

  Рет қаралды 5,328

Checkly

Checkly

Күн бұрын

Пікірлер: 31
@andersonmann
@andersonmann Ай бұрын
Very helpful. Greetings from Brazil
@TestingMatters
@TestingMatters Ай бұрын
If the complete code, incorporating validation and data flows, is available and provided to the LLM with a suitable prompt, success is almost certain. The LLM can generate Page Objects and a comprehensive set of positive and negative tests. From my experiments, Claude 3.5 has shown excellent capability in creating quality Playwright artifacts, but the results rely heavily on the context and the clarity of the prompt (e.g., specifying locator preferences). The challenge becomes apparent with component-based frameworks like React and Angular, where validation logic and data flows might be scattered across components or APIs. Without clear business rules or fully accessible code, it often feels like a game of peek-a-boo, leaving QA to ask the eternal question: “Show me the requirements!”
@ChecklyHQ
@ChecklyHQ Ай бұрын
Yeah, that's right and thanks for the comment. I would be very keen on seeing a prompt that works well for you.
@gdd546
@gdd546 10 күн бұрын
i also have tried this as I was learning playwright automation. i'd gather all the locators and test files 'd need updating, and then write specific prompts. i was surprised when i was given a code that worked fully, along with each test file updated correctly with the new page objects and methods. at first my prompts weren't so good, but then i realised i'd need to be more specific with locators and test files. i work with a fully developed framework already, so theres alot of files that talk to each other
@kapilkapoor7191
@kapilkapoor7191 2 ай бұрын
Honestly I loved the content.
@ChecklyHQ
@ChecklyHQ 2 ай бұрын
Thank you! Glad it was valuable! 🦝
@Muhammad55597
@Muhammad55597 2 ай бұрын
the best content for playwright 👌
@manuQAE
@manuQAE Ай бұрын
Very Cool! the best content for Playwright!
@ChecklyHQ
@ChecklyHQ Ай бұрын
Thank you! Great to see that you're still following along. 💙
@ppp.1334
@ppp.1334 2 ай бұрын
Cool, But what happend when you have more complex issue With more files Like passing context etc - I have problem too keep browser connections When one test finishes and another should be run the same session, Any suggestions?
@alejandrosejas
@alejandrosejas 2 ай бұрын
great content, perhaps you could showcase how, codegen generated code can then be updated to use POM and omit clicks() etc using CursorAI
@ChecklyHQ
@ChecklyHQ 2 ай бұрын
Yes! This is only part one of a planned series. Cursor and Copilot are next. And I'm very grateful for every suggestion. Thank you! 🦝
@alejandrosejas
@alejandrosejas 2 ай бұрын
@@ChecklyHQ@ChecklyHQ, we are very grateful that you and your team keep releasing this quality of content! It is really useful, and I've learned a lot from your videos. Please keep them coming! 🎭
@ChecklyHQ
@ChecklyHQ Ай бұрын
Thanks for the kind words! 💙 Happy the videos are valuable.
@og4789
@og4789 2 ай бұрын
Very impressive, Thank you for your efforts!
@ChecklyHQ
@ChecklyHQ 2 ай бұрын
My pleasure! 🦝
@og4789
@og4789 2 ай бұрын
Do you know the command for codegen in case of using .env files?
@ChecklyHQ
@ChecklyHQ 2 ай бұрын
@@og4789 I'm not sure I understand. How do .env files relate to codegen?
@og4789
@og4789 2 ай бұрын
So baseURL from env variables I have to type always manually into npx playwright codegen command right?
@ChecklyHQ
@ChecklyHQ Ай бұрын
Yes I think so. :)
@sen86sen
@sen86sen 2 ай бұрын
have you tried with snapshots feature which is released today ??
@ChecklyHQ
@ChecklyHQ 2 ай бұрын
I haven't checked the new feature yet, but I might play around with it next week. :)
@sen86sen
@sen86sen 2 ай бұрын
@ thanks for your reply
@alexanderkomanov4151
@alexanderkomanov4151 2 ай бұрын
Thanks for your video. What about searchgpt, that can access the web. Or maybe perplexity, that also can go to the web sources.
@ChecklyHQ
@ChecklyHQ Ай бұрын
I haven't used any of these but I'll put them on the list for possible future videos. Thank you! 🦝
@tririfandani1876
@tririfandani1876 2 ай бұрын
Nice video Stefan! you should try using the new claude computer use API, it will opens up a lot more possibilities, for example I think we can omit the html/css/js context to the prompt
@ChecklyHQ
@ChecklyHQ 2 ай бұрын
Great idea! I'll put it on the list because I'm planning a series and this video is only part 1. 🫣 Thank you!
@Kabbinj
@Kabbinj 2 ай бұрын
First mistake was to use gpt4, instead of o1. It would probably have been able to do more with less. Anyways, you do not use chatgpt for this, and you mention, you need custom built in tools that can on their own, in an iterative fashion, fetch the data they need to keep writing the test.
@ChecklyHQ
@ChecklyHQ 2 ай бұрын
Thanks for the tip. I just played with o1 a little bit and I couldn't find a real improvement. Without enough context, they both fail to generate good code, and with enough context, roles and rules, they both succeed. > you do not use chatgpt for this I 100% agree with you; I took this example as the kick-off, because I've literally seen these instructions in some docs: "To get started with Playwright, head over to ChatGPT and tell it what it should do"... And I'm not kidding. 🫣
@aidoka2000
@aidoka2000 2 ай бұрын
Tabnine ai extension can help as well
@ChecklyHQ
@ChecklyHQ Ай бұрын
Thank you! I'll check it out!
How good is GitHub Copilot at generating Playwright code?
15:12
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
Why Are Programmers Switching from ChatGPT to Claude 3.5
5:30
Codex Community
Рет қаралды 87 М.
Run Playwright Tests in Gitlab CI/CD Pipeline
12:10
Error Farm
Рет қаралды 3,6 М.
Turn Playwright into AI-Powered Test Automation with Claude MCP Server 🧠
13:20
Test like a pro with Playwright and GitHub Copilot
14:24
Visual Studio Code
Рет қаралды 14 М.
How to test dynamic content in Playwright with API mocking
5:39
Masterclass: AI-driven Development for Programmers
8:49
Fireship
Рет қаралды 1,2 МЛН
Why "page.goto()" is slowing down your tests
8:55
Checkly
Рет қаралды 7 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН