ClassSettingsConfigSectionHandler
Settings object config section handler. Use this object to read a Settings config section in a .config file.
You can persist the settings for your application/test cases in a config file.
The following is a sample config file that holds certain settings. Any settings not specified in this section, their values will be set to the system defaults:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="WebAii.Settings" type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler,ArtOfTest.WebAii"/> </configSections>
<WebAii.Settings defaultBrowser="InternetExplorer" logLocation="D:\Log" executionTimeout="30000" clientReadyTimeout="60000" localWebServer="None"; webAppPhysicalPath="c:\Inetpub\wwwroot\MyApplication" enableScriptLogging="false" queryEventLogErrorsOnExit="false" enableUILessRequestViewing="false" baseUrl="http://www.testsite.com/" executionDelay="0" annotateExecution="false" annotationMode="All" logAnnotations="false" simulatedMouseMoveSpeed="0.3f" waitCheckInterval="500" aspNetDevServerPort="-1" createLogFile="true" killBrowserProcessOnClose="false" killBrowsersBeforeStart="false" recycleBrowser="false" useHttpProxy="false" enableSilverlight="false" xMultiMgr="false" silverlightConnectTimeout="60000" elementWaitTimeout="15000" />
</configuration>
In your code, you can get these settings by using the SettingsConfigSectionHandler like this:
SettingsConfigSectionHandler settingsSection = (SettingsConfigSectionHandler)ConfigurationManager.GetSection("WebAii.Settings"); Settings mySettings = new Settings(settingsSection);
You can then use mySettings to pass in to the Manager constructor.
Definition
Namespace:ArtOfTest.WebAii.Core
Assembly:ArtOfTest.WebAii.dll
Syntax:
public class SettingsConfigSectionHandler : ConfigurationSection
Inheritance: objectConfigurationElementConfigurationSectionSettingsConfigSectionHandler
Inherited Members
Constructors
SettingsConfigSectionHandler()
Declaration
public SettingsConfigSectionHandler()
Properties
AnnotateExecution
Whether to enable execution highlight.
Declaration
[ConfigurationProperty("annotateExecution", IsRequired = false, DefaultValue = false)]
public bool AnnotateExecution { get; set; }
Property Value
AnnotationMode
Gets the annotation mode.
Declaration
[ConfigurationProperty("annotationMode", IsRequired = false, DefaultValue = AnnotationMode.All)]
public AnnotationMode AnnotationMode { get; set; }
Property Value
ClientReadyTimeout
Gets the client ready timeout.
Declaration
[ConfigurationProperty("clientReadyTimeout", IsRequired = false, DefaultValue = 30000)]
public int ClientReadyTimeout { get; set; }
Property Value
CreateLogFile
Gets whether to create a log file on disk.
Declaration
[ConfigurationProperty("createLogFile", IsRequired = false, DefaultValue = true)]
public bool CreateLogFile { get; set; }
Property Value
DisableDialogMonitoring
Whether to disable handling of dialog windows. Disabling dialog handling can prevent some undesirable behavior triggered by bugs in the .NET UI Automation services.
Declaration
[ConfigurationProperty("disableDialogMonitoring", IsRequired = false, DefaultValue = false)]
public bool DisableDialogMonitoring { get; set; }
Property Value
ElementWaitTimeout
The global wait for elements timeout (msec) to be used during execution.
Declaration
[ConfigurationProperty("elementWaitTimeout", IsRequired = false, DefaultValue = 15000)]
public int ElementWaitTimeout { get; set; }
Property Value
ExecutionDelay
The execution delay set.
Declaration
[ConfigurationProperty("executionDelay", IsRequired = false, DefaultValue = 0)]
public int ExecutionDelay { get; set; }
Property Value
ExecutionTimeout
Gets the Execution timeout for commands.
Declaration
[ConfigurationProperty("executionTimeout", IsRequired = false, DefaultValue = 20000)]
public int ExecutionTimeout { get; set; }
Property Value
LogAnnotations
Gets whether to log annotations to log file.
Declaration
[ConfigurationProperty("logAnnotations", IsRequired = false, DefaultValue = false)]
public bool LogAnnotations { get; set; }
Property Value
LogLocation
Gets the log location where all logging by the framework will take place.
Declaration
[ConfigurationProperty("logLocation", IsRequired = false, DefaultValue = "C:\\WebAiiLog\\")]
public string LogLocation { get; set; }
Property Value
QueryEventLogErrorsOnExit
If true, will query the event log for any un expected client errors.
Declaration
[ConfigurationProperty("queryEventLogErrorsOnExit", IsRequired = false, DefaultValue = false)]
public bool QueryEventLogErrorsOnExit { get; set; }
Property Value
RecordingCodec
Gets the screen recording codec.
Declaration
[ConfigurationProperty("recordingCodec", IsRequired = false, DefaultValue = RecordingCodec.MJPEG)]
public RecordingCodec RecordingCodec { get; set; }
Property Value
RecordingFPS
Gets the screen recording frames per seconds.
Declaration
[ConfigurationProperty("recordingFPS", IsRequired = false, DefaultValue = 5)]
public int RecordingFPS { get; set; }
Property Value
RecordingMode
Gets the screen recording mode.
Declaration
[ConfigurationProperty("recordingMode", IsRequired = false, DefaultValue = RecordingMode.Off)]
public RecordingMode RecordingMode { get; set; }
Property Value
RecordingOutputLocation
Gets the screen recording frames per seconds.
Declaration
[ConfigurationProperty("recordingOutputLocation", IsRequired = false, DefaultValue = "")]
public string RecordingOutputLocation { get; set; }
Property Value
RecordingScale
Gets the screen recording scale.
Declaration
[ConfigurationProperty("recordingScale", IsRequired = false, DefaultValue = 100)]
public int RecordingScale { get; set; }
Property Value
RecordingSizeLimit
Gets the screen recording file size limit
Declaration
[ConfigurationProperty("recordingSizeLimit", IsRequired = false, DefaultValue = 0)]
public int RecordingSizeLimit { get; set; }
Property Value
SimulatedMouseMoveSpeed
The simulated mouse move speed
Declaration
[ConfigurationProperty("simulatedMouseMoveSpeed", IsRequired = false, DefaultValue = 0.3)]
public float SimulatedMouseMoveSpeed { get; set; }
Property Value
TelerikComponentsVersion
The Telerik Components version to use
Declaration
[ConfigurationProperty("telerikComponentsVersion", IsRequired = false, DefaultValue = TelerikComponentsVersion.Latest)]
public TelerikComponentsVersion TelerikComponentsVersion { get; set; }
Property Value
UnexpectedDialogAction
Specifies the action to take when an unexpected dialog is encountered
Declaration
[ConfigurationProperty("unexpectedDialogAction", IsRequired = false, DefaultValue = UnexpectedDialogAction.HandleAndFailTest)]
public UnexpectedDialogAction UnexpectedDialogAction { get; set; }
Property Value
WaitCheckInterval
The global wait.Forxx interval check.
Declaration
[ConfigurationProperty("waitCheckInterval", IsRequired = false, DefaultValue = 500)]
public int WaitCheckInterval { get; set; }
Property Value
XMultiMgr
Enables WebAii 1.1 style connections to the browser. Added for backwards compatibility for VistaPrint doing parallel testing multiple managers.
Declaration
[ConfigurationProperty("xMultiMgr", IsRequired = false, DefaultValue = false)]
public bool XMultiMgr { get; set; }
Property Value