3/06/2012

Add more configuration items to the configs.csv

By default, SelDotNet only get default setting values for


  • Language
  • Browser
  • Base Url
  • Timeout
  • Connection String
  • Auto Capture Screenshot
  • Default Username
  • Default Password

If you want to get more settings from configs.csv file, please follow these following steps.
  1. Add as many property/value as to the configs.csv file.
    Example: Project Name, SelDotNet Implementation
  2. In the Entry Point Class that inherits from BaseTest Project, Override the virtual method
        const string PROJECT_NAME ="Project Name";
        protected override void DoLoadCustomConfigs(Configuration conf)
        {
            Engine.Configs.AddProperty(
                PROJECT_NAME, 
                conf.GetProperty(PROJECT_NAME)
                );
        } 
    
  3. Later, everytime you want to get this value, just  call
        Engine.Configs.GetProperty(TheProject.PROJECT_NAME);
    

No comments:

Post a Comment