LetCode with Koushik, any idea why am I getting 0 scenario 0 steps. I follow exact step by step as you. I tried to resolve the issue via the cucumber.json and check all the file path but still no luck. Please, I need help as I think I have spent all day in resolving this issue. Any help from anyone would be appreciate.. Thanks in advance
Pls check the following steps. Dry run should be false, Path is correct for required feature files and step definitions. Get the file path from vs code - right click on the file click copy relative path. Don't type.
Hi Koushik, i tried to open two browser windows by adding parallel 2 as you shown but its opening empty tab in the same browser. it didn't open new browser window. what could be the reason? Regards, Ragav
Thank you for the videos, I just started with playwright, I would like to know how to add a configuracion file for deviceManager, like browserManager...
"./node_modules/@types", "src/helper/types" sometimes we give path starting with dot(.) and in second one without dot ,dot represents curr directory ,but why is it so ,WE DONT PUT LIKE ./src/helper/types ,PLS GUIDE #Iam using same project structure as yours
Yes, ./ is required when accessing local files to specify that the file path is relative to the current directory. For built-in modules or packages from node_modules, simply use the module name without ./.
While running 12 th steps .(Then Verify that user should display with validation message when Click on Add button with NULL value When User enters more than of characters and User should be able view the validation character limit reached Message limit reached Message@@letcode
Hi Koushik, thank you very much for your videos, it's very useful and interesting!🙂 Unfortunatly, I'm just a beginner in playwright and automation and this is why I have one small question( So for this project is it possible to run tests at multiple browsers at the same time?
I changed to this project structure managing environments, but the performance decreased, and now my scripts are not working, those are dying because of timeOut, why could it be?
Hi Koushik, recordings are really super useful, do you have similar topics covered in JS? getting 'please pass the browser value' error in JS when we pass environment variable as parameter
@@letcode now it is working, i don't know why but that env.baseurl was not getting ready to be used in login.ts file, when i tried it printing then it worked and now it is working suddenly. thank you for your reply. :)
even though headless is true for you its launching chrome and firefox,I tried same for me as well,not sure whether luanch options for headless is working or not
How to implement traces ,debug , in playwright with cucumber? In normal playwright with mocha will do in playwright config file .kindly add your inputs
Hi Koushik, getting below error TypeError: Unable to require file: src\support\types\env.d.ts This is usually the result of a faulty configuration or import. Make sure there is a `.js`, `.json` or other executable extension with loader attached before `ts-node` available. could u help me pls?
import * as dotenv from 'dotenv' export const getEnv = () => { if (process.env.ENV) { dotenv.config({ override: true, path: `src/helper/env/.env.${process.env.ENV}` }) }else { console.error("NO ENV PASSED!") } } what will happen if I remove : override: true, is it mandatory ,I know overloading and overriding , but didnot got why we used it here pls guide ,you told in video I dont want to use my global things ,Iam not able to understand
ok got it adding here for future reference : This code ensures that the environment variables defined in the .env file with the path constructed using process.env.ENV (e.g., .env.development or .env.production) take precedence over any identically named environment variables already set in the system(your laptop).
Code: github.com/ortoniKC/Playwright_Cucumber_TS
rest of the code also same for javascript
@letcode .we can use page.pause for debug .I tried
Another incredible tutorial mate. Very helpful 🙂
Thanks, Koushik for all the time and effort. Amazing tutorial.
My pleasure!
hi @Koushik, Thank you,
How to change the browser type depending upon the pakage.json in report.ts file?
You have to use the js config and read the environment variables, In the following videos I have a demo.
@@letcode Thank you Koushik
LetCode with Koushik, any idea why am I getting 0 scenario 0 steps. I follow exact step by step as you. I tried to resolve the issue via the cucumber.json and check all the file path but still no luck. Please, I need help as I think I have spent all day in resolving this issue. Any help from anyone would be appreciate.. Thanks in advance
Pls check the following steps.
Dry run should be false,
Path is correct for required feature files and step definitions.
Get the file path from vs code - right click on the file click copy relative path. Don't type.
Hi Koushik,
i tried to open two browser windows by adding parallel 2 as you shown but its opening empty tab in the same browser. it didn't open new browser window. what could be the reason?
Regards,
Ragav
Is it working fine with one browser?
@@letcode yea I can open one browser , couldn’t open two browser at the same time
Hi Kousik , unable to run/debug cucumber through test runner(cucmber-js) - I am able to see list of features but unbale to run and debug
Is there any error message? And dry run is set to false?
Hi koushik, how do we handle mobile devices in the browser manager and use them?
You can change view port with in context option.
can you run test in paralel on twodiff browsers? say one instance of chromium and one of ff?
I doubt that, I have to give it a try
@@letcode would be nice to have only one report in the end, that's why I'm asking
how can we open another chrome tab and perform action within step definition file ?
It is a window handling concept, I have a video on page object model for this, you can use the same concept.
Thank you for the videos, I just started with playwright, I would like to know how to add a configuracion file for deviceManager, like browserManager...
You can use the json file to store all the configurations.
"./node_modules/@types",
"src/helper/types"
sometimes we give path starting with dot(.) and in second one without dot ,dot represents curr directory ,but why is it so ,WE DONT PUT LIKE ./src/helper/types ,PLS GUIDE
#Iam using same project structure as yours
Yes, ./ is required when accessing local files to specify that the file path is relative to the current directory. For built-in modules or packages from node_modules, simply use the module name without ./.
Hello again my friend. The suggestions doesn't work in my VSCode. Can you give an advice for fix this? Thanks
Please check all the configuration again
Thanks Koushik
Welcome 🤗
Hi Bro, I got this Error: function uses multiple asynchronous interfaces: callback and promise, How to fix this
When u r getting this?
While running 12 th steps .(Then Verify that user should display with validation message when Click on Add button with NULL value
When User enters more than of characters and User should be able view the validation character limit reached Message
limit reached Message@@letcode
Hi Koushik, thank you very much for your videos, it's very useful and interesting!🙂
Unfortunatly, I'm just a beginner in playwright and automation and this is why I have one small question(
So for this project is it possible to run tests at multiple browsers at the same time?
Hi, not at the same time.
Parallel execution possible but with a browser at a time.
@@letcode Thanks😊
Do have sample with javascript?
No
I changed to this project structure managing environments, but the performance decreased, and now my scripts are not working, those are dying because of timeOut, why could it be?
Managing the environment should not decrease the performance.
Maybe your test application is slow,
Try increasing the timeout.
@@letcode Increased the time, but it seems was trouble with the bandwidth of internet, now is working fine :) after several times XD
Hi Koushik, recordings are really super useful, do you have similar topics covered in JS? getting 'please pass the browser value' error in JS when we pass environment variable as parameter
Environment variable setting is the same for js and ts.
Use gitbash.
process.env is not working, i guess problem is in env.ts config path variable which also not working with templates
I hope you're using git terminal?
@@letcode now it is working, i don't know why but that env.baseurl was not getting ready to be used in login.ts file, when i tried it printing then it worked and now it is working suddenly. thank you for your reply. :)
@bhargavgurav3160 magic is real 💪
even though headless is true for you its launching chrome and firefox,I tried same for me as well,not sure whether luanch options for headless is working or not
Yes, i have noticed it.
It's not working, I'll update it in upcoming videos.
@@letcode Is there any update on this? Even if I give false it is opening headless browser
You pass that directly for now without function. I'll see.
How to use launch options for java script .kindly tell
It will be the same. U have to not mention the type like : type
Thanks Kaushik🎉
Welcome 😄
Is there a way to read the channel from the env file ?
Instead of browser make it as channel
How to handle ignore https error through cucumber with playwright ?
got it .😊by passing ignore https true in context of hooks page
Awesome. I learnt this from u now.
How to implement traces ,debug , in playwright with cucumber? In normal playwright with mocha will do in playwright config file .kindly add your inputs
Trace file i have already added.
Debugging is not working I'm looking for alternate ways.
@@letcodecan please give video link where you are added this traces file
I'll update the code base.
Hii bro ,iam getting the browser as undefined when i pass through the .env
I hope you're using git bash as a terminal.
Even after adding complier options file not getting browser type in browser manager file .I am using through javascript 😊
You won't get the types for js that's y I prefer the ts.
How can I run a scenario at a time in both chrome and firefox?
I don't think that is possible, at least with the setup we have.
Hi Koushik,
getting below error
TypeError: Unable to require file: src\support\types\env.d.ts
This is usually the result of a faulty configuration or import. Make sure there is a `.js`, `.json` or other executable extension with loader attached before `ts-node` available.
could u help me pls?
I hope you have watched the first video also, ts-node must be installed.
import * as dotenv from 'dotenv'
export const getEnv = () => {
if (process.env.ENV) {
dotenv.config({
override: true,
path: `src/helper/env/.env.${process.env.ENV}`
})
}else {
console.error("NO ENV PASSED!")
}
}
what will happen if I remove : override: true, is it mandatory ,I know overloading and overriding , but didnot got why we used it here pls guide ,you told in video I dont want to use my global things ,Iam not able to understand
Override means , I want to use the local variables, those environment variables can be global as well.
ok got it adding here for future reference :
This code ensures that the environment variables defined in the .env file with the path constructed using process.env.ENV (e.g., .env.development or .env.production) take precedence over any identically named environment variables already set in the system(your laptop).
@sumitgoyal385 yes correct
Hi Koushik, Cucumber report is not getting generated, only first time it got generated
I ran using gitbash then its working. Thanks for covering that too at end of the video
Welcome 🤗
can you please add logger functionality
Ok
Getting an error in: npm i dotenv -D
Like
Code EAI_AGAIN
syscall getaddrinfo
errno EAI_AGAIN
R u able to add other packages?
It worked now
Cool