Hi Koushik, thank you for the great series. Could you enable auto-generated subtitles for all videos? English is not my first language, so the Engsub will help me a lot to understand your tutorial. Thanks
Hi Koushik, Thanks for making such a nice tutorial series. I have a query: How we will create BDD (or other) framework in PlayWright? Which tools we require to do so? Thanks
Hi, thanks for the feedback. As of now we have used jest and playwright test runner. In upcoming days I'll start cucumber. Its easy only, as we do in selenium or protractor.
Could you tell me, why better the mentioned method to launch a webpage, then : test.beforeEach(async ({ page }) => { const baseUrl = 'https:...' await page.goto(baseUrl )} Or it is does not matter? (I have only one browser chrome)
Good question. I will prefer playwright now. Few good reasons are there, like the automatic waits. Recording of tests and so many things. It is more easy I feel
Hey Koushik, When I install Playwright my dev dependencies does not include Jest, I closely followed your tutorial. In devDependencies I only have "@playwright/test" and nothing else. I cannot continue the tutorial it is always saying Jest is not recognized command , any help ?
Bro engha office la playwright with typescript padichi script pottu katta sollirukangha. Endha playlist dha first pakkanum ella vera edhachi erukka.. because jasmine soldringha protector soldringha jest soldringha purila
Jest did not exit one second after the test run has completed. This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue. Am getting above error again and again plz help me how to resolve
Hi Koushik, am getting cannot find module '../traverse/traversefast' Require stack error while executing "jest login.test.ts command". Please suggest the solution
Nice video bro. When installing npm playwrigght browser in vscode, i'm getting failed error which says "unable to install chromium and get local issuer certificate" in my company laptop. DO you have any suggestion?
Hi brother Iam able to understand how to use playwright runner ,one question when we hit npx playwright test example.spec.ts ,so we donot need to convert the file to js ,as you mentioned in jest lecture you did some setup (Iam not following jest) as many people going with playwright testrunner ,so my question is we donot need to worry about conversion of typescript to js ?
Hi Koushik, I want to use single class object across multiple test suits in playwright, is it possible here? I tried various solutions, but not working, could you please help me here.. Thank you!
Hi Koushik, I am unable to launch chromium browser. Getting below error: '/System/Library/Frameworks/Chromium Framework.framework/Versions/105.0.5195.19/Chromium Framework' (no such file). Can you please help with this?
@@letcode Yes have installed below dependencies: "@playwright/test": "^1.25.0", "@types/jest": "^28.1.6", "jest": "^28.1.3", "jest-cli": "^28.1.3", "jest-playwright-preset": "^2.0.0", "playwright-core": "^1.25.0", "ts-jest": "^28.0.7", "tslib": "^2.4.0", "typescript": "^4.7.4" and also installed chromium browser on machine but still getting this error. When I am running with other browser like chrome its working fine.
Hi Koushik, I am getting Error at Launch Browser › Open URL Like: Timeout - Async callback was not invoked within the 3000 ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 3000 ms timeout specified by jest.setTimeout.Error: How to fix this issue, Please help me
Hello bhai , you said We should give name like fiilename.test.ts ,but playwright default test name is example.spec.js which one we choose or we can choose anyone
Despite having headerless false and close browser, this error is still coming. How can I fix it? Kindly Tell me "" Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Error:""
Hey! Question to see if you really master playwright or not : I got 3 url with the same html page , I have to do the same tests for each url, so I have a loop around my test with url var, but I want to run it in parallele in 3 different tab of the same browser ? How can I achieve it?
Oh , in that case it should work with describe block, pls check if the package is added properly. Now it is recommended to use the playwright test runner jest is not good.
@@letcode Seems it resolved but now getting specified in the "transform" object of Jest configuration must export a `process` or `processAsync` or `createTransformer` function.
Hi Koushik, I'm getting error : C:\TestPlaywright\Pattern\test\lounchBrowser.test.ts:1 ({"Object.":function(module,exports,require,__dirname,__filename,jest){import { chromium } from 'playwright'; ^^^^^^ SyntaxError: Cannot use import statement outside a module can you please help me.
Hi Koushik Thanks a ton for this wonderful video series. I am getting below error while try to run the script: npm ERR! code EJSONPARSE npm ERR! path C:\Users\DebjaniG\Desktop\Project Docs\playwright/package.json npm ERR! JSON.parse Unexpected string in JSON at position 648 while parsing '{ npm ERR! JSON.parse "name": "playwright", npm ERR! JSON.parse "version": "' npm ERR! JSON.parse Failed to parse JSON data. npm ERR! JSON.parse Note: package.json must be actual JSON, not just JavaScript. can you please let me know what is the wrong thing I am doing Thanks in Advance
Hi brother My describe blocks not recognized no autosuggestions coming as well ,found your one video > ruclips.net/video/qoG5gidhj_A/видео.html , do I need to move to test runner or Jest ,which one you suggest ?
Hi Koushik, I've gone through your video and run the launchBrowser.test.ts file. It still failed the test because of Timeout, even though I've used " await browser.close()" command, thanks in advance
I searched for Playwright tutorial and i end up here. Good content. Thank you
Glad u like it, thank you 😊
Hi Koushik, thank you for the great series. Could you enable auto-generated subtitles for all videos? English is not my first language, so the Engsub will help me a lot to understand your tutorial. Thanks
Sure, most of the video already has auto generated subtitles, I'll check again.
Hi Koushik, Thanks for making such a nice tutorial series. I have a query: How we will create BDD (or other) framework in PlayWright? Which tools we require to do so? Thanks
Hi, thanks for the feedback.
As of now we have used jest and playwright test runner.
In upcoming days I'll start cucumber.
Its easy only, as we do in selenium or protractor.
Could you tell me, why better the mentioned method to launch a webpage, then :
test.beforeEach(async ({ page }) => {
const baseUrl = 'https:...'
await page.goto(baseUrl )}
Or it is does not matter? (I have only one browser chrome)
This is the second video of the playlist, i started from the basis.
Continue with the playlist it will get changed.
@koushik Do you have any platform or code review forum to discuss about issues coming up in RUclips videos to be discussed. Kindly do update. Thanks.
Yes, discord is there, you can find the link from the channel page..
Hi Koushik thanks for the nice tutorial. What would you choose btw Protractor and Playwright and why? Thanks
Good question.
I will prefer playwright now.
Few good reasons are there, like the automatic waits. Recording of tests and so many things.
It is more easy I feel
@@letcode Thanks Koushik. You are doing a great job!
Hi Koushik, I am getting Cannot find module 'playwright' or its corresponding type declarations. Error
What is the best solution for this??
Dependencies not installed properly i guess.
Hi Koushik. We’re planning on migrating from Jasmine to Playwright. Do you know if there’s a way to use ‘jasmine-data-provider’ in Playwright?
There is no option as data provider but data can stored in an array and test can be iterate
@@letcode Thank you so much for the feedback. I'll try to implement it with array and see how it goes.
Hey Koushik,
When I install Playwright my dev dependencies does not include Jest, I closely followed your tutorial. In devDependencies I only have
"@playwright/test" and nothing else.
I cannot continue the tutorial it is always saying Jest is not recognized command , any help ?
Hi, we don't use jest anymore.
Playwright has its own test runner.
Pls watch this to understand ruclips.net/video/qoG5gidhj_A/видео.html
@@letcode I do understand now. So I should just skip the jest part and move on with the course correct ?
Thank you for fast response
@@Aowek955 yes 😊, welcome
Bro engha office la playwright with typescript padichi script pottu katta sollirukangha. Endha playlist dha first pakkanum ella vera edhachi erukka.. because jasmine soldringha protector soldringha jest soldringha purila
Idhu full ah paarunga bro puriyum
@@letcode okay, Thank you
Jest did not exit one second after the test run has completed.
This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
Am getting above error again and again plz help me how to resolve
You have close all the objects like browser, context and page.
import {chromium} from "playwright";
describe('Launch Browser', () => {
test('open letcode', async () => {
const browser = await chromium.launch({headless:false})
const context = await browser.newContext();
const page = await browser.newPage();
await page.goto("www.google.com")
await page.waitForTimeout(5000)
await browser.close();
})
})
Plz find my above code guide me what went wrong
You should choose the page and context as well
@@letcode I closed browser, context and page, but still getting an error
@@242526mafars I am having the same issue. Any resolution?
Hi Koushik,
am getting cannot find module '../traverse/traversefast'
Require stack error while executing "jest login.test.ts command". Please suggest the solution
Hi, that is your file path I beleive, you might have given wrong file path
Nice video bro. When installing npm playwrigght browser in vscode, i'm getting failed error which says "unable to install chromium and get local issuer certificate" in my company laptop. DO you have any suggestion?
Seems like company has blocked those links to download files.
Can you check with network admin.
Hi brother Iam able to understand how to use playwright runner ,one question when we hit npx playwright test example.spec.ts ,so we donot need to convert the file to js ,as you mentioned in jest lecture you did some setup (Iam not following jest) as many people going with playwright testrunner ,so my question is we donot need to worry about conversion of typescript to js ?
Playwright will handle that, no need to worry about it.
@@letcode thanks brother I will surely buy you one coffee after this series 😊
I am facing error while writing describe keyword...
Jest is not required now, only playwright is enough.
Hi Koushik,
I want to use single class object across multiple test suits in playwright, is it possible here?
I tried various solutions, but not working, could you please help me here..
Thank you!
Yes,
ruclips.net/video/w05KGL8G0f4/видео.html
Hi Koushik,
I am unable to launch chromium browser. Getting below error:
'/System/Library/Frameworks/Chromium Framework.framework/Versions/105.0.5195.19/Chromium Framework' (no such file).
Can you please help with this?
Is all the dependencies installed correctly
@@letcode Yes have installed below dependencies:
"@playwright/test": "^1.25.0",
"@types/jest": "^28.1.6",
"jest": "^28.1.3",
"jest-cli": "^28.1.3",
"jest-playwright-preset": "^2.0.0",
"playwright-core": "^1.25.0",
"ts-jest": "^28.0.7",
"tslib": "^2.4.0",
"typescript": "^4.7.4"
and also installed chromium browser on machine but still getting this error. When I am running with other browser like chrome its working fine.
I'm not sure about it, can u check this latest installation video
ruclips.net/video/AdFgipIPAlg/видео.html
It will be helpful if you start from scratch
I started from scratch only. Go with the playlist 🙂
Awesome. Thanks a lot
Hi Koushik,
I am getting Error at Launch Browser › Open URL
Like:
Timeout - Async callback was not invoked within the 3000 ms timeout specified by jest.setTimeout.Timeout
- Async callback was not invoked within the 3000 ms timeout specified by jest.setTimeout.Error:
How to fix this issue, Please help me
HI, In the config you have to increase the timeout option.
@@letcode In Which Config file , Need to increase timeout
Hello bhai , you said We should give name like fiilename.test.ts ,but playwright default test name is example.spec.js which one we choose or we can choose anyone
Anything is fine.
While using jest name.test is recommended, for playwright test runner anything is fine
Despite having headerless false and close browser, this error is still coming. How can I fix it? Kindly Tell me
"" Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within
the 5000 ms timeout specified by jest.setTimeout.Error:""
Pls refer the code in GitHub, link in the description.
You have to increase the timeout.
@@letcode What is language type & Can we run multiple test cases simultaneously?
Yeah you can do everything, continue with the playlist, I'm using typescript language in this playlist.
@@letcode Thank You
Hey! Question to see if you really master playwright or not : I got 3 url with the same html page , I have to do the same tests for each url, so I have a loop around my test with url var, but I want to run it in parallele in 3 different tab of the same browser ? How can I achieve it?
I'm not a master.
Sir how to fix "ReferenceError: describe is not definedplaywright" error. Please guide me
It should be test.desctibe using playwright test runner.
@@letcode Sir but I am using Jest test runner
Oh , in that case it should work with describe block, pls check if the package is added properly.
Now it is recommended to use the playwright test runner jest is not good.
Hi Kaushik
Nice tutorial.
Can you please give detailed tutorial of playwright -typescript using cucumber(BDD)
I need it for my new project
Working on it, tutorial coming soon.
@@letcode Thanks
Waiting for it
Hi Koushik
I am getting " SyntaxError: Cannot use import statement outside a module" error
R u using JS ?
@@letcode No, using TS
Try to reinstall the dependency again and check.
@@letcode Seems it resolved but now getting specified in the "transform" object of Jest configuration
must export a `process` or `processAsync` or `createTransformer` function.
hey thank you very much , can we record the audio of the test please?
I haven't tried, may be it can I believe.
I'm new to typescript but guest what i will learn playwright first
If u know any programming language, then learning TS is very easy. All three best.
How get red flag to FAIL word? and yellow for RUNS
Sorry i didn't get it.
Subscribed ☺
Thanks 👍
very nice.
Thank you 😊
Hi Koushik,
I'm getting error :
C:\TestPlaywright\Pattern\test\lounchBrowser.test.ts:1
({"Object.":function(module,exports,require,__dirname,__filename,jest){import { chromium } from 'playwright';
^^^^^^
SyntaxError: Cannot use import statement outside a module
can you please help me.
Hi bro
R u using javascript?
@@letcode no I'm using type script
Try reinstalling all the dependency
@@letcode sure I will try
Hi Koushik Thanks a ton for this wonderful video series.
I am getting below error while try to run the script:
npm ERR! code EJSONPARSE
npm ERR! path C:\Users\DebjaniG\Desktop\Project Docs\playwright/package.json
npm ERR! JSON.parse Unexpected string in JSON at position 648 while parsing '{
npm ERR! JSON.parse "name": "playwright",
npm ERR! JSON.parse "version": "'
npm ERR! JSON.parse Failed to parse JSON data.
npm ERR! JSON.parse Note: package.json must be actual JSON, not just JavaScript.
can you please let me know what is the wrong thing I am doing
Thanks in Advance
U have compile time issue in package.jsin file.
You can check the reference in my GitHub.
Link in the description.
@@letcode it is working fine now. Thank you for your all support and prompt reply.
What is jest?
Jest is a unit testing framework to run js/TS.
Similar to Jasmine or mocha
Iam confused how to proceed as here ruclips.net/video/qoG5gidhj_A/видео.html ,kaushik says migrate to test runner
Within the test block everything will be the same as the playwright code.
The only difference is the runner.
Hi brother My describe blocks not recognized no autosuggestions coming as well ,found your one video > ruclips.net/video/qoG5gidhj_A/видео.html , do I need to move to test runner or Jest ,which one you suggest ?
Test runner is better as explained in the video.
@@letcode should I skip start 21 videos and continue with 22nd video ??
@@sumitgoyal385 no continue all the video, only thing is instead of creating page like chromium.create all those, use the fixture test ({page})
Hi Koushik,
I've gone through your video and run the launchBrowser.test.ts file.
It still failed the test because of Timeout, even though I've used " await browser.close()" command,
thanks in advance
You have to increase the timeout in config file.
@@letcode Thanks
@@letcode how to do that
Go to playwright.config file,
You will find a timeout, there u have to increase the value.
For reference you can check my GitHub repo.
@@letcode Hi, where can I find the playwright.config file? I'm brand new to this so sorry if it's a dumb question.