Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to override browser name and other property values #12

Open
Redinbox opened this issue Jul 29, 2023 · 0 comments
Open

How to override browser name and other property values #12

Redinbox opened this issue Jul 29, 2023 · 0 comments

Comments

@Redinbox
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant