Playwright: Any way to take data from different config.json for testcases instead of adding all env in json

73 Views Asked by At

Hi I have added the data in config.json

{
    "prd": {
        "baseUrl": "https://xyz",
        "SDDC_ID": "test",
        "ORG_ID": "1222-222",
        "ORG_NAME": "SOme prg"
},
    "stg": {
        "baseUrl": "https://xyz.stage",
        "SDDC_ID": "stage-sddc",
        "ORG_ID": "9832-2223",
        "ORG_NAME": "stg org"
    }
}

This is in one config, Now I want to introduce one more config with different data to run playwright tcs and on the bases of requirement one of the json should be picked. Is there a way to achieve this ?

I have tried different approaches but didnt work.

0

There are 0 best solutions below