private void DriverContext_CapabilitiesSet(object sender, CapabilitiesSetEventArgs args) { if (args == null || args.Capabilities == null) { throw new ArgumentNullException(); } // Set the capability args.Capabilities.SetCapability("name", TestContext.CurrentContext.Test.FullName); }
private void DriverContext_CapabilitiesSet(object sender, CapabilitiesSetEventArgs args) { if (args == null || args.Capabilities == null) { throw new ArgumentNullException(); } var settings = ConfigurationManager.GetSection("environments/" + this.environment) as NameValueCollection; // if there are any settings if (settings != null) { // loop through all of them foreach (string key in settings.AllKeys) { Logger.Trace(CultureInfo.CurrentCulture, "Adding driver capability {0}", key); args.Capabilities.SetCapability(key, settings[key]); } } }