Hi Koushik, all your videos are great! You are a great teacher!
@letcode Жыл бұрын
Thanks 🥳
@shankykalra49876 ай бұрын
Hi Koushik, Thanks for your hardwork, at my workplace, the code is hosted at Azure, so can we run the Github actions with some shell scripting over their. Please let me know your thoughts. Thanks.
@letcode6 ай бұрын
I have a video on the azure pipeline you can refer to.
@floriandrouot76727 ай бұрын
Hello Koushik. Thank you a lot for sharing this wonderfull course ! I have an issue, all my tests are running fine locally on windows but in github Action it doesn't find any scenario and any steps.. I haved chack the path and everything looks ok.. Do you have any idea what happened ?
@letcode7 ай бұрын
Pls check the path, and also it is case sensitive so make sure everything is the correct path and sensitive.
@floriandrouot76727 ай бұрын
@@letcode thanks for the answer, what do you mean by case sensitive ?
@saanviS-d8i9 ай бұрын
Hi Kaishik, first, thanks for such an easily understandable explanation! Can you please let me know if I use javascript what all the changes I have to make in the framework? Also please mention the advantages of ts over js in the framework
@letcode9 ай бұрын
For js no changes required, it should work as it is. I have a playlist where I explained the best of TS compared to JS. kzbin.info/aero/PL699Xf-_ilW5VXRsJwBJLmDGrsrYxBjQT&si=ajPRqMouq_FNJLNh
@Ashokkumar-uv4fs10 ай бұрын
Hi @koushik, cucumber tags is not able to regonized in azure pipeline, i tired to run @regression tags but it will execute the scenarios
@letcode10 ай бұрын
Pipeline reading environment variables are different.
@RahulReddy-pt2zx6 ай бұрын
Hi koushik I'm also facing the same I'm running in the local machine , for attaching screenshot I'm using Aftereach but it won't work for video in trying After also .. Can you please help me out in this for generating the video .. same error I'm getting (cannot read properties of null ) reading path
@letcode6 ай бұрын
For video I have covered in another video, you can also check my code in the GitHub
@asdfauiuhasduhfpaiuduy2 Жыл бұрын
Hello Koushik. Thank you a lot for sharing this course. I have a question, it looks like GitHub takes the report folder from the local machine, the last local run actually (not the test run while pushing to GitHub). Is that correct?
@letcode Жыл бұрын
Hi, no. we don't push the report folder. Tests will completed on the cloud and then that report folder will be used.
@asdfauiuhasduhfpaiuduy2 Жыл бұрын
@@letcode thank you, yes you are right, I found my mistake. take care bro you are the best
@pranitingole5562 Жыл бұрын
@@asdfauiuhasduhfpaiuduy2 what mistake you did , can you share actually i push code but only reports folder is generating
@ajithlal5289 Жыл бұрын
Hello Koushik I have started following your videos recently and they are really amazing. Can you please do some videos on Integration of playwright TS with Testrail. It would be really helpfull.
@letcode Жыл бұрын
Hi, thanks. Sure I'll check
@cristhiamguerrero1700 Жыл бұрын
or with Xray it will be amazing!
@sathishbabu78247 ай бұрын
Hey koushik, thanks for the video. I m having issue with video. Video is not recording for me. I m getting error TypeError: Cannot read properties of null (reading 'path'). could you help me please?
@letcode7 ай бұрын
Hey, R u running in local or ci? Is the video path correct.
@RahulReddy-pt2zx6 ай бұрын
Hi koushik I'm also facing the same I'm running in the local machine , for attaching screenshot I'm using Aftereach but it won't work for video in trying After also .. Can you please help me out in this for generating the video .. same error I'm getting (cannot read properties of null ) reading path
@Gauravsharma-yi2dl8 ай бұрын
Hi Koushik , not able to run cucumber tags in github worklfow, , getting Config/cucumber.js file not found error.
@letcode7 ай бұрын
Is the path correct?
@Gauravsharma-yi2dl7 ай бұрын
@@letcode : issue was in Capital "C" of Config.
@letcode7 ай бұрын
Great, 👍
@anjaliak57785 ай бұрын
Hi, how can we take a screenshot in a function like in a step and attach it to the report?
@letcode5 ай бұрын
I have covered in the same playlist
@Ashokkumar-uv4fs Жыл бұрын
Hi Kowshik, how to run test case after dev environment deployment completed automatically.
@letcode Жыл бұрын
What services does your dev team use? For instance, we use circle ci and we use orb to achieve that.
@Ashokkumar-uv4fs11 ай бұрын
Hi Koushik, i am getting this error ( page.goto: net::ERR_NAME_NOT_RESOLVED at ) while running in pipeline, how to resolve this issue
@danielkovacs3664 Жыл бұрын
hi the video generating should work locally too or just in pipeline?
@letcode Жыл бұрын
Should work in both.
@alexrv851 Жыл бұрын
Got a question, i am getting an error when executing the test with the video attach code: "TypeError: Cannot read properties of null (reading 'path')" i have review the code so many times, still not able to attach the videos to the reports, can you please help out? Thanks!
@letcode Жыл бұрын
It should be a path error, or you forget to choose the context. You can right click on the folder - copy relative path.
@alexrv851 Жыл бұрын
@@letcode I think i found the issue, silly me !! I had "const page = await browser.newPage()" instead of "const page = await context.newPage()" at the Before hook 🤦♂🙈
@Fernando-qo9cu Жыл бұрын
@@alexrv851 you saved my life 😀
@s.niraimathimathi7576 Жыл бұрын
Hi Koushik, Could you please let me know how to add trace viewer in cucumber report
@letcode Жыл бұрын
Thanks for the suggestion, will do that.
@pranitingole5562 Жыл бұрын
Hi Koushik, I push code to GitHub, but inside github action, there is a problem I am facing it generate only a reports folder with cucumber-reports.json and cucumber-reports.json it not generating video and report
@letcode Жыл бұрын
Make sure all the config are correct and u have pushed the same to git.
@ManikanthN-uh5sc Жыл бұрын
same error I am also facing @@letcode
@pranitingole5562 Жыл бұрын
Hi @koushik i don't want to run all the feature file, if I did npm test it run all file, I want to run one feature file at a time, is thare any way to run one file at abtime
@letcode Жыл бұрын
In the path u can put that feature file name only.
@VeluR-1993Ай бұрын
Hi bro I'm not using fs extra what should i do to attach the video with fs extra
@letcodeАй бұрын
You can only fs from node but fs-extra is easy so I have used it here
@HariBaabu-dp1mf Жыл бұрын
Hello Koushik, How to test the API, with playwright and cucumber
@letcode Жыл бұрын
Same bro , no difference just write the feature file with your api description, Within the steps write your Playwright api code.
@HariBaabu-dp1mf Жыл бұрын
Looks like request entity works only with the test runner
@letcode Жыл бұрын
@@HariBaabu-dp1mf u can also use page.request
@rajath71806 ай бұрын
Hi @koushik ,I can see even if Test failed in github actions ,my github action build is passed with green color ,how to make it fail if one of test fails ,can u pls provide me proper yaml file ?
@letcode6 ай бұрын
Because in the test command I have || true , that means even if it fails it will continue the next step, in my case it was required. You can remove that and it will show failed if failures are there.
@rajath71806 ай бұрын
@@letcode ohh interesting thnx
@rajath71806 ай бұрын
but it will not generate report if we remove it right in case of failure
@letcode6 ай бұрын
Yes correct. That's the issue. I guess there should be an option you have to check the docs.
@rajath71806 ай бұрын
@@letcode yes yesterday Able to resolve pasting yaml file here for ur reference name: Playwright Tests on: push: branches: [ main, master ] pull_request: branches: [ main, master ] jobs: test: timeout-minutes: 60 runs-on: ubuntu-latest env: TEST_STATUS: "" steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 18 - name: Install dependencies run: npm ci - name: Install Playwright Browsers run: npx playwright install --with-deps - name: Run Playwright tests id: test run: | npm test | tee test-output.txt if grep -q "failed" test-output.txt; then echo "Tests failed" echo "failed" > test-status.txt else echo "Tests passed" echo "PASSED" > test-status.txt fi shell: bash - name: Set test status id: set_test_status run: echo "TEST_STATUS=$(cat test-status.txt)" >> $GITHUB_ENV - name: Check test status run: | if [ "$TEST_STATUS" == "failed" ]; then exit 1 fi - uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} with: name: playwright-report path: test-results/ retention-days: 30
@swapnilbodade1336 Жыл бұрын
Hi Kaushik, Appreciate your efforts, One query - Instead of downloadable report, Can we show report link there itself, user can view the report and play the video as well without downloading it.
@letcode Жыл бұрын
Hi, Yes I guess using Github pages we can achieve that but I haven't tried.
@hemalathabharath184 Жыл бұрын
anna please frame work la base class pathi video podung itself help ful for every one anna pls neenga tamil la solarathu easy understand iruku
@letcode Жыл бұрын
Ok 👌
@venkateshravi4485 Жыл бұрын
Bro, could you please tell us how to handle the Google captcha in Selenium Java?
@letcode Жыл бұрын
The intention of captcha is to prevent automation. So we don't automate captcha.
@MuhammadHussain-ub8nd Жыл бұрын
TypeError: Cannot read properties of null (reading 'path') When adding video attacment the hooks.js gives this error path is null
@letcode Жыл бұрын
Happening only in CI?
@MuhammadHussain-ub8nd Жыл бұрын
@@letcoderesolved actually i was doing it in js so little tweak was required appreciate your response
@praveen-Vlog9 ай бұрын
Hi bro This html report does not refresh old records also listed on the report Please give me any suggestions to resolve that issue beo
@letcode9 ай бұрын
It always replaces the old one,
@praveen-Vlog9 ай бұрын
@@letcode but I need to recap on each and every time to generated on new only when I change in our script.
@Prabhakar.Yenkarla Жыл бұрын
If the video size is large then I am not able to play the video in the report. Is there a way to handle when the video size is large?
@letcode Жыл бұрын
I haven't checked that, but it should work. Is the default size working?
@Prabhakar.Yenkarla Жыл бұрын
Thank you so much for the reply😊…. If the size of the video is less than 1 mb then I can play it in the report. If it is more than that then I am not able to play it in the report
@letcode Жыл бұрын
Oh ok, check it in the local directory if it's playing.
@Prabhakar.Yenkarla Жыл бұрын
Yes it’s playing in the local but not in the report. So do we have any option to make it play even on report?
@Prabhakar.Yenkarla Жыл бұрын
Do we have any on/off option for the video recording??
@sumitgoyal3856 ай бұрын
In After ,If we put only video attach code and remove screenshot code video will not be attached in the final index.html report ,although it will be present in cucumber-report.html can you please tell me why is it so ;as below After(async function ({pickle,result}) { let videoPath: string; videoPath = await fixture.page.video().path(); const img = await fixture.page.screenshot(); await fixture.page.close(); await context.close(); if (result?.status == Status.PASSED) { await this.attach( fs.readFileSync(videoPath), 'video/webm' )}; //Iam taking screenshot not attaching it so video also not visible to me , also If I attach screenshot video will get attached too
@letcode6 ай бұрын
Depending on your requirements you can change the configuration.
@sumitgoyal3856 ай бұрын
@@letcode Hi thanx ,my question was If I attached video as in code video should appear , unless Iam not writing screenshot code video is not attached this is issue it should not happen right
@letcode6 ай бұрын
Based on your code I can see, you are taking the screenshot but not attaching. Whereas the video is attached.
@sumitgoyal3856 ай бұрын
@@letcode yes I removed only video I wanted ,and video not attached If I remove ss code ,weird isn't it
@yahyamahmudiy9 ай бұрын
Hello Koushik, thank you for making such amazing content. I have one problem. I have been repeating step by step exactly what you wrote. But after this video, my "test-results/reports" folder has gone. It was being generated before. The rest of them working as expected, but the "reports" are not being generated. I mean "multiple-cucumber-html-reporter".
@letcode9 ай бұрын
Hello, welcome. I guess you have to change the test folder path as you are using the cucumber report.
@brveg1 Жыл бұрын
Can u please talk about how to debug playwright cucumber scripts.
@letcode Жыл бұрын
U can use page.pause within script.
@Yasser-hq1xo Жыл бұрын
With inspector??
@letcode Жыл бұрын
Yes
@Anna-kd5oz Жыл бұрын
Sent an email to you. Ty!
@letcode Жыл бұрын
Replied
@Ashokkumar-uv4fs11 ай бұрын
Hi Koushik, i am getting below error in while running script in pipeline, but works fine in local. what should i change. Then Verify SOS Visible Sussefully # apps/sos-e2e/src/test/steps/loginSteps.ts:45 locator.textContent: Timeout 30000ms exceeded. Call log: - waiting for locator('span.Header_sos__08fUM').first()
@letcode11 ай бұрын
Timeout means the element is not visible or not loaded, try to get the screenshot and check if the element present or not.