Read values from a Config file for tests


I want to load config file for a test written in C#. for instance, username, headless mode etc. I m not sure if i need to add an appsettings or just a config file and add these parameters? I tried with a config file using a config file with key value pairs and then adding this to the script: ConfigurationManager.AppSettings[“Username”], but this doesnt work. How is it used? appsettings.json or App.config. I m writing a test using c# with .net core. Please advise or provide any examples to follow

thank you

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.