diff --git a/src/Samples/Todo.Core/Todo.Core.csproj b/src/Samples/Todo.Core/Todo.Core.csproj
index 046edd76..cc758c85 100644
--- a/src/Samples/Todo.Core/Todo.Core.csproj
+++ b/src/Samples/Todo.Core/Todo.Core.csproj
@@ -14,7 +14,6 @@
..\..\
true
..\..\packages\Fody.1.13.12
-
true
diff --git a/src/Samples/Wpf/WpfTodo.UITests/WpfTodo.UITests.csproj b/src/Samples/Wpf/WpfTodo.UITests/WpfTodo.UITests.csproj
index 8201d537..aff703bf 100644
--- a/src/Samples/Wpf/WpfTodo.UITests/WpfTodo.UITests.csproj
+++ b/src/Samples/Wpf/WpfTodo.UITests/WpfTodo.UITests.csproj
@@ -13,7 +13,6 @@
512
..\..\..\
true
-
true
diff --git a/src/Samples/Wpf/WpfTodo/Properties/Resources.Designer.cs b/src/Samples/Wpf/WpfTodo/Properties/Resources.Designer.cs
index d726c331..4f345067 100644
--- a/src/Samples/Wpf/WpfTodo/Properties/Resources.Designer.cs
+++ b/src/Samples/Wpf/WpfTodo/Properties/Resources.Designer.cs
@@ -1,17 +1,17 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.34003
+// Runtime Version:4.0.30319.18010
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
-namespace WpfTodo.Properties {
- using System;
-
-
+namespace WpfTodo.Properties
+{
+
+
///
/// A strongly-typed resource class, for looking up localized strings, etc.
///
@@ -22,40 +22,48 @@ namespace WpfTodo.Properties {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
+ internal class Resources
+ {
+
private static global::System.Resources.ResourceManager resourceMan;
-
+
private static global::System.Globalization.CultureInfo resourceCulture;
-
+
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
+ internal Resources()
+ {
}
-
+
///
/// Returns the cached ResourceManager instance used by this class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WpfTodo.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
-
+
///
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
return resourceCulture;
}
- set {
+ set
+ {
resourceCulture = value;
}
}
diff --git a/src/Samples/Wpf/WpfTodo/Properties/Settings.Designer.cs b/src/Samples/Wpf/WpfTodo/Properties/Settings.Designer.cs
index e8b85081..995c3139 100644
--- a/src/Samples/Wpf/WpfTodo/Properties/Settings.Designer.cs
+++ b/src/Samples/Wpf/WpfTodo/Properties/Settings.Designer.cs
@@ -1,24 +1,28 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.34003
+// Runtime Version:4.0.30319.18010
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
-namespace WpfTodo.Properties {
-
-
+namespace WpfTodo.Properties
+{
+
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
+
+ public static Settings Default
+ {
+ get
+ {
return defaultInstance;
}
}
diff --git a/src/Samples/Wpf/WpfTodo/WpfTodo.csproj b/src/Samples/Wpf/WpfTodo/WpfTodo.csproj
index 0ad27786..4ae58265 100644
--- a/src/Samples/Wpf/WpfTodo/WpfTodo.csproj
+++ b/src/Samples/Wpf/WpfTodo/WpfTodo.csproj
@@ -16,7 +16,6 @@
..\..\..\
true
..\..\..\packages\Fody.1.13.12
-
true
diff --git a/src/Samples/Wpf/WpfTodo/app.config b/src/Samples/Wpf/WpfTodo/app.config
index 02edb219..0a1d6288 100644
--- a/src/Samples/Wpf/WpfTodo/app.config
+++ b/src/Samples/Wpf/WpfTodo/app.config
@@ -1,15 +1,15 @@
-
+
-
-
+
+
-
-
+
+
-
+
\ No newline at end of file
diff --git a/src/TestStack.White.Reporting/App.config b/src/TestStack.White.Reporting/App.config
index 54e99795..78a9897c 100644
--- a/src/TestStack.White.Reporting/App.config
+++ b/src/TestStack.White.Reporting/App.config
@@ -12,4 +12,4 @@
-
+
diff --git a/src/TestStack.White.Reporting/TestStack.White.Reporting.csproj b/src/TestStack.White.Reporting/TestStack.White.Reporting.csproj
index 95af03ea..48b2d1d1 100644
--- a/src/TestStack.White.Reporting/TestStack.White.Reporting.csproj
+++ b/src/TestStack.White.Reporting/TestStack.White.Reporting.csproj
@@ -17,7 +17,7 @@
3.5
- v3.5
+ v4.0
true
white.snk
publish\
@@ -62,7 +62,7 @@
False
- ..\packages\Castle.Core.3.2.2\lib\net35\Castle.Core.dll
+ ..\packages\Castle.Core.3.2.2\lib\net40-client\Castle.Core.dll
diff --git a/src/TestStack.White.Reporting/packages.config b/src/TestStack.White.Reporting/packages.config
index 17cf8acb..94012eeb 100644
--- a/src/TestStack.White.Reporting/packages.config
+++ b/src/TestStack.White.Reporting/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/TestStack.White.ScreenObjects.UITests/TestStack.White.ScreenObjects.UITests.csproj b/src/TestStack.White.ScreenObjects.UITests/TestStack.White.ScreenObjects.UITests.csproj
index 6a1f53d0..cf1eb599 100644
--- a/src/TestStack.White.ScreenObjects.UITests/TestStack.White.ScreenObjects.UITests.csproj
+++ b/src/TestStack.White.ScreenObjects.UITests/TestStack.White.ScreenObjects.UITests.csproj
@@ -10,7 +10,7 @@
Properties
TestStack.White.ScreenObjects.UITests
TestStack.White.ScreenObjects.UITests
- v3.5
+ v4.0
512
@@ -55,12 +55,13 @@
MinimumRecommendedRules.ruleset
-
- ..\packages\Castle.Core.3.2.2\lib\net35\Castle.Core.dll
+
+ False
+ ..\packages\Castle.Core.3.2.2\lib\net40-client\Castle.Core.dll
False
- ..\packages\NSubstitute.1.6.1.0\lib\NET35\NSubstitute.dll
+ ..\packages\NSubstitute.1.6.1.0\lib\NET40\NSubstitute.dll
diff --git a/src/TestStack.White.ScreenObjects.UITests/packages.config b/src/TestStack.White.ScreenObjects.UITests/packages.config
index 183fcd0c..884b0709 100644
--- a/src/TestStack.White.ScreenObjects.UITests/packages.config
+++ b/src/TestStack.White.ScreenObjects.UITests/packages.config
@@ -1,6 +1,6 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/src/TestStack.White.ScreenObjects/App.config b/src/TestStack.White.ScreenObjects/App.config
index 8ec45556..cea38cf9 100644
--- a/src/TestStack.White.ScreenObjects/App.config
+++ b/src/TestStack.White.ScreenObjects/App.config
@@ -22,4 +22,4 @@
-
+
diff --git a/src/TestStack.White.ScreenObjects/TestStack.White.ScreenObjects.csproj b/src/TestStack.White.ScreenObjects/TestStack.White.ScreenObjects.csproj
index 285ea6b5..bf4b9257 100644
--- a/src/TestStack.White.ScreenObjects/TestStack.White.ScreenObjects.csproj
+++ b/src/TestStack.White.ScreenObjects/TestStack.White.ScreenObjects.csproj
@@ -15,7 +15,7 @@
3.5
- v3.5
+ v4.0
true
white.snk
publish\
@@ -60,7 +60,7 @@
False
- ..\packages\Castle.Core.3.2.2\lib\net35\Castle.Core.dll
+ ..\packages\Castle.Core.3.2.2\lib\net40-client\Castle.Core.dll
diff --git a/src/TestStack.White.ScreenObjects/packages.config b/src/TestStack.White.ScreenObjects/packages.config
index 17cf8acb..94012eeb 100644
--- a/src/TestStack.White.ScreenObjects/packages.config
+++ b/src/TestStack.White.ScreenObjects/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/TestStack.White.UITests/App.config b/src/TestStack.White.UITests/App.config
index 060ab87d..74ff35fc 100644
--- a/src/TestStack.White.UITests/App.config
+++ b/src/TestStack.White.UITests/App.config
@@ -11,4 +11,4 @@
-
+
diff --git a/src/TestStack.White.UITests/TestStack.White.UITests.csproj b/src/TestStack.White.UITests/TestStack.White.UITests.csproj
index 5f2aac1e..60384729 100644
--- a/src/TestStack.White.UITests/TestStack.White.UITests.csproj
+++ b/src/TestStack.White.UITests/TestStack.White.UITests.csproj
@@ -9,11 +9,10 @@
Properties
TestStack.White.UITests
TestStack.White.UITests
- v3.5
+ v4.0
512
..\
true
-
true
@@ -40,8 +39,9 @@
MinimumRecommendedRules.ruleset
-
- ..\packages\Castle.Core.3.2.2\lib\net35\Castle.Core.dll
+
+ False
+ ..\packages\Castle.Core.3.2.2\lib\net40-client\Castle.Core.dll
diff --git a/src/TestStack.White.UITests/packages.config b/src/TestStack.White.UITests/packages.config
index 177c2bdd..ab3c3387 100644
--- a/src/TestStack.White.UITests/packages.config
+++ b/src/TestStack.White.UITests/packages.config
@@ -1,5 +1,5 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/TestStack.White.UnitTests/App.config b/src/TestStack.White.UnitTests/App.config
index 7535664c..248b3c96 100644
--- a/src/TestStack.White.UnitTests/App.config
+++ b/src/TestStack.White.UnitTests/App.config
@@ -34,4 +34,4 @@
-
+
diff --git a/src/TestStack.White.UnitTests/CoreProjectTest.cs b/src/TestStack.White.UnitTests/CoreProjectTest.cs
index c577e62d..a30a5532 100644
--- a/src/TestStack.White.UnitTests/CoreProjectTest.cs
+++ b/src/TestStack.White.UnitTests/CoreProjectTest.cs
@@ -79,7 +79,7 @@ public void AllUIItemsHaveDefaultConstructor()
AllSubsclassesHaveEmptyConstructor(collection, typeof(SearchCriteria));
AllSubsclassesHaveEmptyConstructor(collection, typeof(AutomationElementProperty));
if (collection.Any())
- throw new Exception(string.Join("\r\n", collection.ToArray()));
+ throw new Exception(string.Join("\r\n", collection));
}
private void AllSubsclassesHaveEmptyConstructor(List collection, Type type)
diff --git a/src/TestStack.White.UnitTests/TestStack.White.UnitTests.csproj b/src/TestStack.White.UnitTests/TestStack.White.UnitTests.csproj
index cadda7e8..97cbe00b 100644
--- a/src/TestStack.White.UnitTests/TestStack.White.UnitTests.csproj
+++ b/src/TestStack.White.UnitTests/TestStack.White.UnitTests.csproj
@@ -10,7 +10,7 @@
Properties
TestStack.White.UnitTests
TestStack.White.UnitTests
- v3.5
+ v4.0
512
@@ -59,12 +59,13 @@
MinimumRecommendedRules.ruleset
-
- ..\packages\Castle.Core.3.2.2\lib\net35\Castle.Core.dll
+
+ False
+ ..\packages\Castle.Core.3.2.2\lib\net40-client\Castle.Core.dll
False
- ..\packages\NSubstitute.1.6.1.0\lib\NET35\NSubstitute.dll
+ ..\packages\NSubstitute.1.6.1.0\lib\NET40\NSubstitute.dll
3.0
diff --git a/src/TestStack.White.UnitTests/packages.config b/src/TestStack.White.UnitTests/packages.config
index 183fcd0c..884b0709 100644
--- a/src/TestStack.White.UnitTests/packages.config
+++ b/src/TestStack.White.UnitTests/packages.config
@@ -1,6 +1,6 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/src/TestStack.White.WebBrowser.UITests/TestStack.White.WebBrowser.UITests.csproj b/src/TestStack.White.WebBrowser.UITests/TestStack.White.WebBrowser.UITests.csproj
index 76825862..a64da221 100644
--- a/src/TestStack.White.WebBrowser.UITests/TestStack.White.WebBrowser.UITests.csproj
+++ b/src/TestStack.White.WebBrowser.UITests/TestStack.White.WebBrowser.UITests.csproj
@@ -10,7 +10,7 @@
Properties
TestStack.White.WebBrowser.UITests
TestStack.White.WebBrowser.UITests
- v3.5
+ v4.0
512
true
@@ -58,8 +58,9 @@
MinimumRecommendedRules.ruleset
-
- ..\packages\Castle.Core.3.2.2\lib\net35\Castle.Core.dll
+
+ False
+ ..\packages\Castle.Core.3.2.2\lib\net40-client\Castle.Core.dll
diff --git a/src/TestStack.White.WebBrowser.UITests/packages.config b/src/TestStack.White.WebBrowser.UITests/packages.config
index 177c2bdd..ab3c3387 100644
--- a/src/TestStack.White.WebBrowser.UITests/packages.config
+++ b/src/TestStack.White.WebBrowser.UITests/packages.config
@@ -1,5 +1,5 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/TestStack.White.WebBrowser.UnitTests/TestStack.White.WebBrowser.UnitTests.csproj b/src/TestStack.White.WebBrowser.UnitTests/TestStack.White.WebBrowser.UnitTests.csproj
index 11ab59e8..a7c4161d 100644
--- a/src/TestStack.White.WebBrowser.UnitTests/TestStack.White.WebBrowser.UnitTests.csproj
+++ b/src/TestStack.White.WebBrowser.UnitTests/TestStack.White.WebBrowser.UnitTests.csproj
@@ -10,7 +10,7 @@
Properties
TestStack.White.WebBrowser.UnitTests
TestStack.White.WebBrowser.UnitTests
- v3.5
+ v4.0
512
diff --git a/src/TestStack.White.WebBrowser/TestStack.White.WebBrowser.csproj b/src/TestStack.White.WebBrowser/TestStack.White.WebBrowser.csproj
index 15c9ce87..96fd2b1d 100644
--- a/src/TestStack.White.WebBrowser/TestStack.White.WebBrowser.csproj
+++ b/src/TestStack.White.WebBrowser/TestStack.White.WebBrowser.csproj
@@ -10,7 +10,7 @@
Properties
TestStack.White.WebBrowser
TestStack.White.WebBrowser
- v3.5
+ v4.0
512
true
white.snk
@@ -57,8 +57,9 @@
MinimumRecommendedRules.ruleset
-
- ..\packages\Castle.Core.3.2.2\lib\net35\Castle.Core.dll
+
+ False
+ ..\packages\Castle.Core.3.2.2\lib\net40-client\Castle.Core.dll
diff --git a/src/TestStack.White.WebBrowser/packages.config b/src/TestStack.White.WebBrowser/packages.config
index 17cf8acb..94012eeb 100644
--- a/src/TestStack.White.WebBrowser/packages.config
+++ b/src/TestStack.White.WebBrowser/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/TestStack.White/App.config b/src/TestStack.White/App.config
index 34ef7b76..b4188fa0 100644
--- a/src/TestStack.White/App.config
+++ b/src/TestStack.White/App.config
@@ -27,4 +27,4 @@
-
+
diff --git a/src/TestStack.White/Mappings/ControlDictionary.cs b/src/TestStack.White/Mappings/ControlDictionary.cs
index 774a4e57..88e1d7a4 100644
--- a/src/TestStack.White/Mappings/ControlDictionary.cs
+++ b/src/TestStack.White/Mappings/ControlDictionary.cs
@@ -157,7 +157,7 @@ public virtual Type GetTestControlType(string className, string name, ControlTyp
throw new ControlDictionaryException(string.Format(
"Multiple TestControls found for ControlType={0} and FrameworkId:{1} - {2}",
controlType.LocalizedControlType, frameWorkId,
- string.Join(", ", dictionaryItems.Select(d => d.TestControlType == null ? "null" : d.TestControlType.FullName).ToArray())));
+ string.Join(", ", dictionaryItems.Select(d => d.TestControlType == null ? "null" : d.TestControlType.FullName))));
}
return dictionaryItems.Single().TestControlType;
@@ -180,8 +180,8 @@ public virtual bool IsPrimaryControl(ControlType controlType, string className,
return items.Exists(controlDictionaryItem =>
{
bool isPrimaryMatching = controlDictionaryItem.IsPrimary && ControlTypeMatches(controlType, controlDictionaryItem) && !controlDictionaryItem.IsIdentifiedByClassName && !controlDictionaryItem.IsIdentifiedByName;
- bool identifiedByClassNameMatches = !string.IsNullOrEmpty(className) && className.Contains(controlDictionaryItem.ClassName) && controlDictionaryItem.IsIdentifiedByClassName;
- bool identifiedByNameMatches = !string.IsNullOrEmpty(name) && controlDictionaryItem.TestControlType != null && name.Equals(controlDictionaryItem.TestControlType.Name) && controlDictionaryItem.IsIdentifiedByName;
+ bool identifiedByClassNameMatches = !string.IsNullOrWhiteSpace(className) && className.Contains(controlDictionaryItem.ClassName) && controlDictionaryItem.IsIdentifiedByClassName;
+ bool identifiedByNameMatches = !string.IsNullOrWhiteSpace(name) && controlDictionaryItem.TestControlType != null && name.Equals(controlDictionaryItem.TestControlType.Name) && controlDictionaryItem.IsIdentifiedByName;
return isPrimaryMatching || identifiedByClassNameMatches || identifiedByNameMatches;
});
}
diff --git a/src/TestStack.White/TestStack.White.csproj b/src/TestStack.White/TestStack.White.csproj
index a19392c4..0144de11 100644
--- a/src/TestStack.White/TestStack.White.csproj
+++ b/src/TestStack.White/TestStack.White.csproj
@@ -16,7 +16,7 @@
true
- v3.5
+ v4.0
true
white.snk
http://localhost/Core/
@@ -61,7 +61,7 @@
False
- ..\packages\Castle.Core.3.2.2\lib\net35\Castle.Core.dll
+ ..\packages\Castle.Core.3.2.2\lib\net40-client\Castle.Core.dll
diff --git a/src/TestStack.White/UIItems/Finders/OrSearchCondition.cs b/src/TestStack.White/UIItems/Finders/OrSearchCondition.cs
index e19ee97f..049b9bcd 100644
--- a/src/TestStack.White/UIItems/Finders/OrSearchCondition.cs
+++ b/src/TestStack.White/UIItems/Finders/OrSearchCondition.cs
@@ -29,7 +29,7 @@ public override Condition AutomationCondition
public override string ToString()
{
- return string.Format("({0})", string.Join(" or ", simpleSearchConditions.Select(c => c.ToString()).ToArray()));
+ return string.Format("({0})", string.Join(" or ", simpleSearchConditions.Select(c => c.ToString())));
}
internal override string ToString(string operation)
diff --git a/src/TestStack.White/UIItems/WindowItems/Window.cs b/src/TestStack.White/UIItems/WindowItems/Window.cs
index 3f8dfdfb..b546fc59 100644
--- a/src/TestStack.White/UIItems/WindowItems/Window.cs
+++ b/src/TestStack.White/UIItems/WindowItems/Window.cs
@@ -4,6 +4,7 @@
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
+using System.Threading.Tasks;
using System.Windows;
using System.Windows.Automation;
using TestStack.White.AutomationElementSearch;
@@ -38,7 +39,7 @@ public abstract class Window : UIItemContainer, IDisposable
///
/// This make sure the window is open for a minimum amount of time
///
- private readonly ManualResetEvent minOpenTime;
+ private readonly Task minOpenTime;
public delegate bool WaitTillDelegate();
@@ -60,14 +61,7 @@ protected Window(AutomationElement automationElement, ActionListener actionListe
: base(automationElement, actionListener, initializeOption, windowSession)
{
InitializeWindow();
- minOpenTime = new ManualResetEvent(false);
- Timer timer = null;
- TimerCallback timerCallback = state =>
- {
- timer.Dispose();
- minOpenTime.Set();
- };
- timer = new Timer(timerCallback, null, TimeSpan.FromMilliseconds(500), TimeSpan.FromMilliseconds(-1));
+ minOpenTime = Task.Factory.StartNew(() => Thread.Sleep(500));
}
private void InitializeWindow()
@@ -128,7 +122,7 @@ public virtual bool IsClosed
public virtual void Close()
{
- minOpenTime.WaitOne();
+ minOpenTime.Wait();
var windowPattern = (WindowPattern)Pattern(WindowPattern.Pattern);
try
{
diff --git a/src/TestStack.White/packages.config b/src/TestStack.White/packages.config
index 70772934..0ed592c3 100644
--- a/src/TestStack.White/packages.config
+++ b/src/TestStack.White/packages.config
@@ -1,5 +1,5 @@
-
-
+
+
\ No newline at end of file