playwright-java-test-automation-architecture icon indicating copy to clipboard operation
playwright-java-test-automation-architecture copied to clipboard

How to override browser name and other property values

Open Redinbox opened this issue 2 years ago • 0 comments

Is there any way to update browser name in the config file while sending different browsers from testNG?

tried this way but not working 1st way Properties props = new Properties(); ProjectConfig cfg = ConfigFactory.create(ProjectConfig.class, props); props.setProperty("browser", browserName); 2nd way ConfigFactory.setProperty("browser", browserName); ProjectConfig cfg = ConfigFactory.create(ProjectConfig.class);

while retrieving browser name form config().browser its returns default browser name which is defined in general.properties

Redinbox avatar Jul 29 '23 17:07 Redinbox