-
Notifications
You must be signed in to change notification settings - Fork 1
/
FluentAutomationSettingsProxy.cs
129 lines (114 loc) · 4.35 KB
/
FluentAutomationSettingsProxy.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentAutomation;
namespace ScriptCs.FluentAutomation
{
// Seperate settings block that only applies to ScriptCs execution
internal static class ScriptCsSettings
{
private static bool prettyPrintResults = true;
internal static bool PrettyPrintResults
{
get { return prettyPrintResults; }
set { prettyPrintResults = value; }
}
}
public class FluentAutomationSettingsProxy
{
public bool PrettyPrintResults
{
get { return ScriptCsSettings.PrettyPrintResults; }
set { ScriptCsSettings.PrettyPrintResults = value; }
}
public string UserTempDirectory
{
get
{
return FluentSettings.Current.UserTempDirectory;
}
set
{
FluentSettings.Current.UserTempDirectory = value;
}
}
public string ScreenshotPath
{
get { return FluentSettings.Current.ScreenshotPath; }
set { FluentSettings.Current.ScreenshotPath = value; }
}
public bool ScreenshotOnFailedExpect
{
get { return FluentSettings.Current.ScreenshotOnFailedExpect; }
set { FluentSettings.Current.ScreenshotOnFailedExpect = value; }
}
public bool ScreenshotOnFailedAction
{
get { return FluentSettings.Current.ScreenshotOnFailedAction; }
set { FluentSettings.Current.ScreenshotOnFailedAction = value; }
}
public TimeSpan DefaultWaitTimeout
{
get { return FluentSettings.Current.WaitTimeout; }
set { FluentSettings.Current.WaitTimeout = value; }
}
/// <summary>
/// Time to wait before assuming the provided WaitUntil() condition will never be reached. Defaults to 30 seconds.
/// </summary>
public TimeSpan DefaultWaitUntilTimeout
{
get { return FluentSettings.Current.WaitUntilTimeout; }
set { FluentSettings.Current.WaitUntilTimeout = value; }
}
/// <summary>
/// Time to wait before attempting to validate the provided condition for WatiUntil(). Defaults to 100 milliseconds.
/// </summary>
public TimeSpan WaitUntilInterval
{
get { return FluentSettings.Current.WaitUntilInterval; }
set { FluentSettings.Current.WaitUntilInterval = value; }
}
/// <summary>
/// Wait on all comamnds to be successful. Removes the need for explicit I.WaitUntil() calls for actions
/// </summary>
public bool WaitOnAllActions
{
get { return FluentSettings.Current.WaitOnAllActions; }
set { FluentSettings.Current.WaitOnAllActions = value; }
}
/// <summary>
/// Wait on all I.Expect.* actions to be successful. Removes the need for explicit I.WaitUntil() calls.
/// </summary>
public bool WaitOnAllExpects
{
get { return FluentSettings.Current.WaitOnAllExpects; }
set { FluentSettings.Current.WaitOnAllExpects = value; }
}
/// <summary>
/// Determines whether or not windows will automatically be minimized on start of test execution and reverted when finished. Defaults to true.
/// </summary>
public bool MinimizeAllWindowsOnTestStart
{
get { return FluentSettings.Current.MinimizeAllWindowsOnTestStart; }
set { FluentSettings.Current.MinimizeAllWindowsOnTestStart = value; }
}
/// <summary>
/// Determines the height of the automated browser window. Defaults to null, which will use the provider defaults.
/// </summary>
public int? WindowHeight
{
get { return FluentSettings.Current.WindowHeight; }
set { FluentSettings.Current.WindowHeight = value; }
}
/// <summary>
/// Determines the width of the automated browser window. Defaults to null, which will use the provider defaults.
/// </summary>
public int? WindowWidth
{
get { return FluentSettings.Current.WindowWidth; }
set { FluentSettings.Current.WindowWidth = value; }
}
}
}