From 12eaa9a9a5720d80e86cbe6072cb5ce0d30feb3e Mon Sep 17 00:00:00 2001 From: Ian Ceicys Date: Thu, 17 Nov 2016 12:04:38 -0500 Subject: [PATCH 1/8] Improving the NotepadTest sample with an Advanced Scenario using DataRows. Upgrading to MSTest V2 framework from Microsoft.VisualStudio.QualityTools.UnitTestFramework as MSTest V2 is the modern unit testing framework from Microsoft. Upgrading to the latest versions of Appium Web Driver, Selenium WebDriver, and Castle.Core. --- Samples/C#/NotepadTest/AdvancedScenario.cs | 199 +++++++++++++++++++++ Samples/C#/NotepadTest/NotepadTest.csproj | 38 ++-- Samples/C#/NotepadTest/packages.config | 12 +- 3 files changed, 224 insertions(+), 25 deletions(-) create mode 100644 Samples/C#/NotepadTest/AdvancedScenario.cs diff --git a/Samples/C#/NotepadTest/AdvancedScenario.cs b/Samples/C#/NotepadTest/AdvancedScenario.cs new file mode 100644 index 00000000..c747c34e --- /dev/null +++ b/Samples/C#/NotepadTest/AdvancedScenario.cs @@ -0,0 +1,199 @@ +using System; +using System.Threading; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.Remote; +using OpenQA.Selenium.Appium.iOS; +using System.Collections.Generic; + +namespace NotepadTest +{ + [TestClass] + public class AdvancedScenario + { + protected const string AppDriverUrl = "http://127.0.0.1:4723"; + protected const string NotepadAppId = @"C:\Windows\System32\notepad.exe"; + protected const string ExplorerAppId = @"C:\Windows\System32\explorer.exe"; + protected const string TargetSaveLocation = @"%TEMP%\"; + + + protected static IOSDriver NotepadSession; + + [ClassInitialize] + public static void Setup(TestContext context) + { + // Launch Notepad Classic Windows Application + DesiredCapabilities appCapabilities = new DesiredCapabilities(); + appCapabilities.SetCapability("app", NotepadAppId); + NotepadSession = new IOSDriver(new Uri(AppDriverUrl), appCapabilities); + Assert.IsNotNull(NotepadSession); + // Verify that Notepad is started with untitled new file + Assert.AreEqual("Untitled - Notepad", NotepadSession.Title); + + //Change the font to be more interesting + NotepadSession.FindElementByName("Format").Click(); + NotepadSession.FindElementByName("Font...").Click(); + System.Threading.Thread.Sleep(1000); + NotepadSession.FindElementByName("Cooper").Click(); + NotepadSession.FindElementByName("Black").Click(); + + //Change the font size to be really big + NotepadSession.FindElementByName("72").Click(); + + //close the font dialog + NotepadSession.FindElementByName("OK").Click(); + + Thread.Sleep(1000);// Wait for 1 second until the main windows is displayed + //Enable word wrap + NotepadSession.FindElementByName("Format").Click(); + NotepadSession.FindElementByName("Word Wrap").Click(); + NotepadSession.FindElementByName("Format").Click(); + var wordwrapenabled = NotepadSession.FindElementByName("Word Wrap"); + + } + + + [DataTestMethod] + [DataRow("This is the first advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile1.txt")] + [DataRow("This is the second advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile2.txt")] + //[DataRow("This is the third advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile3.txt")] + //[DataRow("This is the fourth advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile4.txt")] + //[DataRow("This is the fifth advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile5.txt")] + public void AdvancedScenarioTest(string AdvancedText,string TestFileName) + { + EnterText(AdvancedText); + SaveFile(TestFileName); + + // Verify that Notepad has saved the edited text file with the given name + Thread.Sleep(1000); // Wait for 1 second until the window title is updated + Assert.AreEqual(TestFileName + " - Notepad", NotepadSession.Title); + ClearText(); + } + + + public void EnterText(string inputtext) + { + // Enter text into the edit field + var editBox = NotepadSession.FindElementByClassName("Edit"); + // Clear the edit field of any values + editBox.SendKeys(inputtext); + Assert.AreEqual(inputtext, editBox.Text); + + // Enter TimeStamp + NotepadSession.FindElementByName("Edit").Click(); + NotepadSession.FindElementByName("Time/Date").Click(); + Assert.AreNotEqual(inputtext, editBox.Text); + } + + public void SaveFile(string testfilename) + { + NotepadSession.FindElementByName("File").Click(); + NotepadSession.FindElementByName("Save As...").Click(); + + System.Threading.Thread.Sleep(1000); // Wait for 1 second until the save dialog appears + var fileNameBox = NotepadSession.FindElementByAccessibilityId("FileNameControlHost"); + fileNameBox.SendKeys(TargetSaveLocation + testfilename); + NotepadSession.FindElementByName("Save").Click(); + + // Confirm save as dialog in case there's leftover test file from previous test run + try + { + Thread.Sleep(1000); // Wait for 1 second until the dialog comes up + var confirmSaveAsDialog = NotepadSession.FindElementByName("Confirm Save As"); + confirmSaveAsDialog.FindElementByName("Yes").Click(); + } + catch { } + + } + + public void ClearText() + { + NotepadSession.FindElementByName("Edit").Click(); + NotepadSession.FindElementByName("Select All").Click(); + NotepadSession.FindElementByName("Edit").Click(); + NotepadSession.FindElementByName("Delete").Click(); + } + + + [ClassCleanup] + public static void TearDown() + { + List filelist = new List(); + filelist.Add("NotepadAdvancedTestOutputFile1.txt"); + filelist.Add("NotepadAdvancedTestOutputFile2.txt"); + filelist.Add("NotepadAdvancedTestOutputFile3.txt"); + filelist.Add("NotepadAdvancedTestOutputFile4.txt"); + filelist.Add("NotepadAdvancedTestOutputFile5.txt"); + + + //Change the font back to the default + NotepadSession.FindElementByName("Format").Click(); + + System.Threading.Thread.Sleep(1000);// Wait for 1 second until the dialog comes up + NotepadSession.FindElementByName("Font...").Click(); + + //Change the font size back to the default Lucida Console + NotepadSession.FindElementByName("Lucida Console").Click(); + + //Change the font format back to the default regular + NotepadSession.FindElementByName("Regular").Click(); + + //Change the font size back to the default size + NotepadSession.FindElementByName("10").Click(); + + //close the font dialog + NotepadSession.FindElementByName("OK").Click(); + + //Disable word wrap + NotepadSession.FindElementByName("Format").Click(); + NotepadSession.FindElementByName("Word Wrap").Click(); + + // Close Notepad + NotepadSession.FindElementByName("File").Click(); + NotepadSession.FindElementByName("Exit").Click(); + System.Threading.Thread.Sleep(1000);// Wait for 1 second until the dialog comes up + NotepadSession.FindElementByName("Don't Save").Click(); + + NotepadSession = null; + + // Launch Windows Explorer to delete the saved text file above + DesiredCapabilities appCapabilities = new DesiredCapabilities(); + appCapabilities.SetCapability("app", ExplorerAppId); + IOSDriver WindowsExplorerSession = new IOSDriver(new Uri(AppDriverUrl), appCapabilities); + Assert.IsNotNull(WindowsExplorerSession); + + // Create Desktop session to control context menu and access dialogs + DesiredCapabilities desktopCapabilities = new DesiredCapabilities(); + desktopCapabilities.SetCapability("app", "Root"); + IOSDriver DesktopSession = new IOSDriver(new Uri(AppDriverUrl), desktopCapabilities); + Assert.IsNotNull(DesktopSession); + + // Navigate Windows Explorer to the target save location folder + Thread.Sleep(1000); // Wait for 1 second + var addressBandRoot = WindowsExplorerSession.FindElementByClassName("Address Band Root"); + var addressToolbar = addressBandRoot.FindElementByAccessibilityId("1001"); // Address Band Toolbar + WindowsExplorerSession.Mouse.Click(addressToolbar.Coordinates); + addressBandRoot.FindElementByAccessibilityId("41477").SendKeys(TargetSaveLocation + OpenQA.Selenium.Keys.Enter); + + // Locate the saved test files + + foreach (string file in filelist) + { + WindowsExplorerSession.FindElementByAccessibilityId("SearchEditBox").SendKeys(file); + + // Delete the located saved test file + Thread.Sleep(1000); // Wait for 1 second + var shellFolderView = WindowsExplorerSession.FindElementByName("Shell Folder View"); + var targetFileItem = shellFolderView.FindElementByName(file); + Assert.IsNotNull(targetFileItem); + WindowsExplorerSession.Mouse.Click(targetFileItem.Coordinates); + WindowsExplorerSession.Keyboard.SendKeys(OpenQA.Selenium.Keys.Delete); + WindowsExplorerSession.Keyboard.SendKeys(OpenQA.Selenium.Keys.Escape); + } + + WindowsExplorerSession.Quit(); + WindowsExplorerSession = null; + DesktopSession.Quit(); + DesktopSession = null; + } + } +} diff --git a/Samples/C#/NotepadTest/NotepadTest.csproj b/Samples/C#/NotepadTest/NotepadTest.csproj index dbbbabf4..5ec25e3f 100644 --- a/Samples/C#/NotepadTest/NotepadTest.csproj +++ b/Samples/C#/NotepadTest/NotepadTest.csproj @@ -35,27 +35,28 @@ 4 - - packages\Appium.WebDriver.1.5.1.1\lib\net40\appium-dotnet-driver.dll - True + + packages\Appium.WebDriver.2.0.1.1\lib\net45\appium-dotnet-driver.dll - - packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll - True + + packages\Castle.Core.4.0.0-beta002\lib\net45\Castle.Core.dll - - packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll - True + + packages\MSTest.TestFramework.1.0.6-preview\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + + + packages\MSTest.TestFramework.1.0.6-preview\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + + + packages\Newtonsoft.Json.9.0.2-beta1\lib\net45\Newtonsoft.Json.dll - - packages\Selenium.WebDriver.2.53.0\lib\net40\WebDriver.dll - True + + packages\Selenium.WebDriver.3.0.0\lib\net40\WebDriver.dll - - packages\Selenium.Support.2.53.0\lib\net40\WebDriver.Support.dll - True + + packages\Selenium.Support.3.0.0\lib\net40\WebDriver.Support.dll @@ -64,13 +65,10 @@ - - - - - + + diff --git a/Samples/C#/NotepadTest/packages.config b/Samples/C#/NotepadTest/packages.config index 02c1f389..61ded999 100644 --- a/Samples/C#/NotepadTest/packages.config +++ b/Samples/C#/NotepadTest/packages.config @@ -1,8 +1,10 @@  - - - - - + + + + + + + \ No newline at end of file From e24633330a250e75b830a22610dd5969b9a33267 Mon Sep 17 00:00:00 2001 From: Ian Ceicys Date: Thu, 17 Nov 2016 12:11:07 -0500 Subject: [PATCH 2/8] Including additional data rows and removing formatting change --- Samples/C#/NotepadTest/AdvancedScenario.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Samples/C#/NotepadTest/AdvancedScenario.cs b/Samples/C#/NotepadTest/AdvancedScenario.cs index c747c34e..1c44ebd4 100644 --- a/Samples/C#/NotepadTest/AdvancedScenario.cs +++ b/Samples/C#/NotepadTest/AdvancedScenario.cs @@ -46,8 +46,6 @@ public static void Setup(TestContext context) //Enable word wrap NotepadSession.FindElementByName("Format").Click(); NotepadSession.FindElementByName("Word Wrap").Click(); - NotepadSession.FindElementByName("Format").Click(); - var wordwrapenabled = NotepadSession.FindElementByName("Word Wrap"); } @@ -55,9 +53,9 @@ public static void Setup(TestContext context) [DataTestMethod] [DataRow("This is the first advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile1.txt")] [DataRow("This is the second advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile2.txt")] - //[DataRow("This is the third advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile3.txt")] - //[DataRow("This is the fourth advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile4.txt")] - //[DataRow("This is the fifth advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile5.txt")] + [DataRow("This is the third advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile3.txt")] + [DataRow("This is the fourth advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile4.txt")] + [DataRow("This is the fifth advanced automated test on Classic Windows Application! ", "NotepadAdvancedTestOutputFile5.txt")] public void AdvancedScenarioTest(string AdvancedText,string TestFileName) { EnterText(AdvancedText); From 77551cd8e3c71b5232f601bb1df9d68e1bccf325 Mon Sep 17 00:00:00 2001 From: Ian Ceicys Date: Fri, 18 Nov 2016 15:42:38 -0500 Subject: [PATCH 3/8] Repo of WPF app, wpfnotepad, that demonstrates that WinAppDriver cannot find elements --- .gitattributes | 63 ++++++++++++++ Samples/C#/WPFNotepadTest/WPFNotepadTest.sln | 22 +++++ .../WPFNotepadTest/Properties/AssemblyInfo.cs | 36 ++++++++ .../WPFNotepadTest/WPFNotepadTest/Scenario.cs | 34 ++++++++ .../WPFNotepadTest/WPFNotepadTest.csproj | 84 +++++++++++++++++++ .../WPFNotepadTest/packages.config | 10 +++ .../C#/WordTest/Properties/AssemblyInfo.cs | 36 ++++++++ Samples/C#/WordTest/Scenario.cs | 34 ++++++++ Samples/C#/WordTest/WordTest.csproj | 83 ++++++++++++++++++ Samples/C#/WordTest/WordTest.sln | 22 +++++ Samples/C#/WordTest/app.config | 11 +++ Samples/C#/WordTest/packages.config | 10 +++ 12 files changed, 445 insertions(+) create mode 100644 .gitattributes create mode 100644 Samples/C#/WPFNotepadTest/WPFNotepadTest.sln create mode 100644 Samples/C#/WPFNotepadTest/WPFNotepadTest/Properties/AssemblyInfo.cs create mode 100644 Samples/C#/WPFNotepadTest/WPFNotepadTest/Scenario.cs create mode 100644 Samples/C#/WPFNotepadTest/WPFNotepadTest/WPFNotepadTest.csproj create mode 100644 Samples/C#/WPFNotepadTest/WPFNotepadTest/packages.config create mode 100644 Samples/C#/WordTest/Properties/AssemblyInfo.cs create mode 100644 Samples/C#/WordTest/Scenario.cs create mode 100644 Samples/C#/WordTest/WordTest.csproj create mode 100644 Samples/C#/WordTest/WordTest.sln create mode 100644 Samples/C#/WordTest/app.config create mode 100644 Samples/C#/WordTest/packages.config diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..1ff0c423 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/Samples/C#/WPFNotepadTest/WPFNotepadTest.sln b/Samples/C#/WPFNotepadTest/WPFNotepadTest.sln new file mode 100644 index 00000000..799dbe9e --- /dev/null +++ b/Samples/C#/WPFNotepadTest/WPFNotepadTest.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.25914.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFNotepadTest", "WPFNotepadTest\WPFNotepadTest.csproj", "{B0661160-8397-46F0-B8F9-0FDDB205DE4D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0661160-8397-46F0-B8F9-0FDDB205DE4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0661160-8397-46F0-B8F9-0FDDB205DE4D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0661160-8397-46F0-B8F9-0FDDB205DE4D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0661160-8397-46F0-B8F9-0FDDB205DE4D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/C#/WPFNotepadTest/WPFNotepadTest/Properties/AssemblyInfo.cs b/Samples/C#/WPFNotepadTest/WPFNotepadTest/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..903fb4be --- /dev/null +++ b/Samples/C#/WPFNotepadTest/WPFNotepadTest/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WPFNotepadTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WPFNotepadTest")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b0661160-8397-46f0-b8f9-0fddb205de4d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/C#/WPFNotepadTest/WPFNotepadTest/Scenario.cs b/Samples/C#/WPFNotepadTest/WPFNotepadTest/Scenario.cs new file mode 100644 index 00000000..7e57b049 --- /dev/null +++ b/Samples/C#/WPFNotepadTest/WPFNotepadTest/Scenario.cs @@ -0,0 +1,34 @@ +using System; +using OpenQA.Selenium.Remote; +using OpenQA.Selenium.Appium.iOS; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace WPFNotepadTest +{ + [TestClass] + public class Scenario + { + protected const string AppDriverUrl = "http://127.0.0.1:4723"; + protected const string WpfNotepadAppId = @"C:\dev\wpfnotepad.exe"; //copy and build binary from source https://codeoverload.wordpress.com/2010/05/01/wpf-notepad/ + protected const string ExplorerAppId = @"wpfnotepad.exe"; + protected const string TargetSaveLocation = @"%TEMP%\"; + protected static IOSDriver WpfnotepadSession; + + [ClassInitialize] + public static void Setup(TestContext context) + { + // Launch Word Classic Windows Application + DesiredCapabilities appCapabilities = new DesiredCapabilities(); + appCapabilities.SetCapability("app", WpfNotepadAppId); + WpfnotepadSession = new IOSDriver(new Uri(AppDriverUrl), appCapabilities); + Assert.IsNotNull(WpfnotepadSession); + } + [TestMethod] + public void BasicScenario() + { + WpfnotepadSession.FindElementById("txtDocument").Click(); + WpfnotepadSession.FindElementById("txtDocument").SendKeys("Hello World"); + WpfnotepadSession.Quit(); + } + } +} diff --git a/Samples/C#/WPFNotepadTest/WPFNotepadTest/WPFNotepadTest.csproj b/Samples/C#/WPFNotepadTest/WPFNotepadTest/WPFNotepadTest.csproj new file mode 100644 index 00000000..7e965713 --- /dev/null +++ b/Samples/C#/WPFNotepadTest/WPFNotepadTest/WPFNotepadTest.csproj @@ -0,0 +1,84 @@ + + + + + Debug + AnyCPU + {B0661160-8397-46F0-B8F9-0FDDB205DE4D} + Library + Properties + WPFNotepadTest + WPFNotepadTest + v4.5 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 15.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Appium.WebDriver.2.0.1.1\lib\net45\appium-dotnet-driver.dll + + + ..\packages\Castle.Core.4.0.0-beta002\lib\net45\Castle.Core.dll + + + ..\packages\MSTest.TestFramework.1.0.5-preview\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + True + + + ..\packages\MSTest.TestFramework.1.0.5-preview\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + True + + + + + ..\packages\Selenium.WebDriver.3.0.0\lib\net40\WebDriver.dll + + + ..\packages\Selenium.Support.3.0.0\lib\net40\WebDriver.Support.dll + + + + + + + + + + + + Always + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + \ No newline at end of file diff --git a/Samples/C#/WPFNotepadTest/WPFNotepadTest/packages.config b/Samples/C#/WPFNotepadTest/WPFNotepadTest/packages.config new file mode 100644 index 00000000..61ded999 --- /dev/null +++ b/Samples/C#/WPFNotepadTest/WPFNotepadTest/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Samples/C#/WordTest/Properties/AssemblyInfo.cs b/Samples/C#/WordTest/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..7e332fec --- /dev/null +++ b/Samples/C#/WordTest/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WordTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WordTest")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("226c5a0a-502d-477e-89a7-f754d7329b0c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/C#/WordTest/Scenario.cs b/Samples/C#/WordTest/Scenario.cs new file mode 100644 index 00000000..eeb14230 --- /dev/null +++ b/Samples/C#/WordTest/Scenario.cs @@ -0,0 +1,34 @@ +using System; +using OpenQA.Selenium.Remote; +using OpenQA.Selenium.Appium.iOS; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace WordTest +{ + [TestClass] + public class Scenario + { + protected const string AppDriverUrl = "http://127.0.0.1:4723"; + protected const string TextValue = "This is an automated test on Classic Windows Application!"; + protected const string WordAppId = @"C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE"; + protected const string ExplorerAppId = @"C:\Windows\System32\explorer.exe"; + protected const string TestFileName = "NotepadTestOutputFile.txt"; + protected const string TargetSaveLocation = @"%TEMP%\"; + protected static IOSDriver WordSession; + + [ClassInitialize] + public static void Setup(TestContext context) + { + // Launch Word Classic Windows Application + DesiredCapabilities appCapabilities = new DesiredCapabilities(); + appCapabilities.SetCapability("app", WordAppId); + WordSession = new IOSDriver(new Uri(AppDriverUrl), appCapabilities); + Assert.IsNotNull(WordSession); + } + [TestMethod] + public void BasicScenario() + { + WordSession.FindElementByName("Blank document").Click(); + } + } +} diff --git a/Samples/C#/WordTest/WordTest.csproj b/Samples/C#/WordTest/WordTest.csproj new file mode 100644 index 00000000..6ce2e94c --- /dev/null +++ b/Samples/C#/WordTest/WordTest.csproj @@ -0,0 +1,83 @@ + + + + + + Debug + AnyCPU + {226C5A0A-502D-477E-89A7-F754D7329B0C} + Library + Properties + WordTest + WordTest + v4.5 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 15.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + packages\Appium.WebDriver.2.0.1.1\lib\net45\appium-dotnet-driver.dll + + + packages\Castle.Core.4.0.0-beta002\lib\net45\Castle.Core.dll + + + packages\MSTest.TestFramework.1.0.6-preview\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + True + + + packages\MSTest.TestFramework.1.0.6-preview\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + True + + + + + packages\Selenium.WebDriver.3.0.0\lib\net40\WebDriver.dll + + + packages\Selenium.Support.3.0.0\lib\net40\WebDriver.Support.dll + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/Samples/C#/WordTest/WordTest.sln b/Samples/C#/WordTest/WordTest.sln new file mode 100644 index 00000000..4eda7b24 --- /dev/null +++ b/Samples/C#/WordTest/WordTest.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.25914.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WordTest", "WordTest.csproj", "{226C5A0A-502D-477E-89A7-F754D7329B0C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {226C5A0A-502D-477E-89A7-F754D7329B0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {226C5A0A-502D-477E-89A7-F754D7329B0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {226C5A0A-502D-477E-89A7-F754D7329B0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {226C5A0A-502D-477E-89A7-F754D7329B0C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/C#/WordTest/app.config b/Samples/C#/WordTest/app.config new file mode 100644 index 00000000..8ed398dc --- /dev/null +++ b/Samples/C#/WordTest/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/C#/WordTest/packages.config b/Samples/C#/WordTest/packages.config new file mode 100644 index 00000000..61ded999 --- /dev/null +++ b/Samples/C#/WordTest/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file From d9c9787a9c3fc0de9e536c85fc8d9a1d90d50e24 Mon Sep 17 00:00:00 2001 From: Ian Ceicys Date: Fri, 18 Nov 2016 15:52:53 -0500 Subject: [PATCH 4/8] Simplifying repo steps to 1 step --- Samples/C#/WPFNotepadTest/WPFNotepadTest/Scenario.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Samples/C#/WPFNotepadTest/WPFNotepadTest/Scenario.cs b/Samples/C#/WPFNotepadTest/WPFNotepadTest/Scenario.cs index 7e57b049..00b6435a 100644 --- a/Samples/C#/WPFNotepadTest/WPFNotepadTest/Scenario.cs +++ b/Samples/C#/WPFNotepadTest/WPFNotepadTest/Scenario.cs @@ -26,8 +26,7 @@ public static void Setup(TestContext context) [TestMethod] public void BasicScenario() { - WpfnotepadSession.FindElementById("txtDocument").Click(); - WpfnotepadSession.FindElementById("txtDocument").SendKeys("Hello World"); + WpfnotepadSession.FindElementByName("File").Click(); WpfnotepadSession.Quit(); } } From c09ab2b170f1af60bb81509b676e4bf097331733 Mon Sep 17 00:00:00 2001 From: Ian Ceicys Date: Tue, 22 Nov 2016 17:10:41 -0500 Subject: [PATCH 5/8] Improving C# UWP Calculator sample with Advanced Scenario using Data Rows The sample now includes an advanced scenario that drive multiple calculations in the calculator app, and uses the MSTest V2 data row construct to test calculator repeatedly with different data values. http://i.imgur.com/SJIcvHt.png Also upgraded to MSTest V2 framework from Microsoft.VisualStudio.QualityTools.UnitTestFramework as MSTest V2 is the modern unit testing framework from Microsoft. Lastly upgraded to the latest versions of Appium Web Driver, Selenium WebDriver, and Castle.Core. --- .../C#/CalculatorTest/AdvancedScenarios.cs | 173 ++++++++++++++++++ .../C#/CalculatorTest/CalculatorTest.csproj | 19 +- Samples/C#/CalculatorTest/packages.config | 6 +- 3 files changed, 189 insertions(+), 9 deletions(-) create mode 100644 Samples/C#/CalculatorTest/AdvancedScenarios.cs diff --git a/Samples/C#/CalculatorTest/AdvancedScenarios.cs b/Samples/C#/CalculatorTest/AdvancedScenarios.cs new file mode 100644 index 00000000..1f3703b8 --- /dev/null +++ b/Samples/C#/CalculatorTest/AdvancedScenarios.cs @@ -0,0 +1,173 @@ +//****************************************************************************** +// +// Copyright (c) 2016 Microsoft Corporation. All rights reserved. +// +// This code is licensed under the MIT License (MIT). +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +//****************************************************************************** + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using OpenQA.Selenium.Remote; + +namespace CalculatorTest +{ + [TestClass] + public class AdvancedScenarios + { + protected const string WindowsApplicationDriverUrl = "http://127.0.0.1:4723"; + protected static RemoteWebDriver CalculatorSession; + protected static RemoteWebElement CalculatorResult; + protected static string OriginalCalculatorMode; + + [ClassInitialize] + public static void Setup(TestContext context) + { + // Launch the calculator app + DesiredCapabilities appCapabilities = new DesiredCapabilities(); + appCapabilities.SetCapability("app", "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App"); + CalculatorSession = new RemoteWebDriver(new Uri(WindowsApplicationDriverUrl), appCapabilities); + Assert.IsNotNull(CalculatorSession); + CalculatorSession.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(4)); + + // Make sure we're in standard mode + CalculatorSession.FindElementByXPath("//Button[starts-with(@Name, \"Menu\")]").Click(); + OriginalCalculatorMode = CalculatorSession.FindElementByXPath("//List[@AutomationId=\"FlyoutNav\"]//ListItem[@IsSelected=\"True\"]").Text; + CalculatorSession.FindElementByXPath("//ListItem[@Name=\"Standard Calculator\"]").Click(); + + // Use series of operation to locate the calculator result text element as a workaround + // We currently cannot query element by automationId without using modified appium dot net driver + // TODO: Use a proper appium/webdriver nuget package that allow us to query based on automationId + CalculatorSession.FindElementByXPath("//Button[@Name=\"Clear\"]").Click(); + CalculatorSession.FindElementByXPath("//Button[@Name=\"Seven\"]").Click(); + CalculatorResult = CalculatorSession.FindElementByName("Display is 7 ") as RemoteWebElement; + Assert.IsNotNull(CalculatorResult); + } + + [ClassCleanup] + public static void TearDown() + { + // Restore original mode before closing down + CalculatorSession.FindElementByXPath("//Button[starts-with(@Name, \"Menu\")]").Click(); + CalculatorSession.FindElementByXPath("//ListItem[@Name=\"" + OriginalCalculatorMode + "\"]").Click(); + + CalculatorResult = null; + CalculatorSession.Dispose(); + CalculatorSession = null; + } + + [TestInitialize] + public void Clear() + { + CalculatorSession.FindElementByName("Clear").Click(); + Assert.AreEqual("Display is 0 ", CalculatorResult.Text); + } + + [TestMethod] + [DataRow("One", "Plus", "One", "Equals", "2 ")] + [DataRow("One", "Plus", "Two", "Equals", "3 ")] + [DataRow("One", "Plus", "Three", "Equals", "4 ")] + [DataRow("One", "Plus", "Four", "Equals", "5 ")] + [DataRow("One", "Plus", "Five", "Equals", "6 ")] + [DataRow("One", "Plus", "Six", "Equals", "7 ")] + [DataRow("One", "Plus", "Seven", "Equals", "8 ")] + [DataRow("One", "Plus", "Eight", "Equals", "9 ")] + [DataRow("One", "Plus", "Nine", "Equals", "10 ")] + + [DataRow("Nine", "Plus", "Two", "Equals", "11 ")] + [DataRow("Eight", "Plus", "Four", "Equals", "12 ")] + [DataRow("Seven", "Plus", "Six", "Equals", "13 ")] + [DataRow("Six", "Plus", "Eight", "Equals", "14 ")] + [DataRow("Six", "Plus", "Nine", "Equals", "15 ")] + [DataRow("Seven", "Plus", "Nine", "Equals", "16 ")] + [DataRow("Nine", "Plus", "Eight", "Equals", "17 ")] + [DataRow("Nine", "Plus", "Nine", "Equals", "18 ")] + + + public void Addition_Advanced(string input1,string operation,string input2, string equals, string assertion) + { + CalculatorSession.FindElementByName(input1).Click(); + CalculatorSession.FindElementByName(operation).Click(); + CalculatorSession.FindElementByName(input2).Click(); + CalculatorSession.FindElementByName(equals).Click(); + Assert.AreEqual("Display is " + assertion, CalculatorResult.Text); + } + + [TestMethod] + [DataRow("Seven", "Multiply by", "Nine", "Plus", "One", "Equals", "64 ", "Divide by", "Eight", "Equals", "8 ")] + [DataRow("Nine", "Multiply by", "One", "Plus", "One", "Equals", "10 ", "Divide by", "Five", "Equals", "2 ")] + [DataRow("Eight", "Multiply by", "Two", "Plus", "Two", "Equals", "18 ", "Divide by", "Four", "Equals", "4.5 ")] + [DataRow("Seven", "Multiply by", "Three", "Plus", "Four", "Equals", "25 ", "Divide by", "Four", "Equals", "6.25 ")] + [DataRow("Six", "Multiply by", "Four", "Plus", "One", "Equals", "25 ", "Divide by", "Two", "Equals", "12.5 ")] + + public void Combination_Advanced(string input1,string operation1,string input2,string operation2,string input3,string equals1,string assertion1, + string operation3,string input4,string equals2,string assertion2) + { + CalculatorSession.FindElementByXPath("//Button[@Name=\""+input1+"\"]").Click(); + CalculatorSession.FindElementByXPath("//Button[@Name=\""+operation1+"\"]").Click(); + CalculatorSession.FindElementByXPath("//Button[@Name=\""+ input2+ "\"]").Click(); + CalculatorSession.FindElementByXPath("//Button[@Name=\"" + operation2 + "\"]").Click(); + CalculatorSession.FindElementByXPath("//Button[@Name=\"" + input3 + "\"]").Click(); + CalculatorSession.FindElementByXPath("//Button[@Name=\"" + equals1 + "\"]").Click(); + Assert.AreEqual("Display is "+assertion1, CalculatorResult.Text); + CalculatorSession.FindElementByXPath("//Button[@Name=\"" + operation3 + "\"]").Click(); + CalculatorSession.FindElementByXPath("//Button[@Name=\"" + input4 + "\"]").Click(); + CalculatorSession.FindElementByXPath("//Button[@Name=\"" + equals2 + "\"]").Click(); + Assert.AreEqual("Display is " + assertion2, CalculatorResult.Text); + } + + [TestMethod] + [DataRow("Eight", "Eight", "Divide by", "One", "One", "Equals", "8 ")] + [DataRow("Six", "Four", "Divide by", "One", "Zero", "Equals", "6.4 ")] + [DataRow("Five", "Five", "Divide by", "One", "Zero", "Equals", "5.5 ")] + public void Division_Advanced(string input1, string input2, string operation, string input3, string input4, string equals, string assertion) + { + CalculatorSession.FindElementByName(input1).Click(); + CalculatorSession.FindElementByName(input2).Click(); + CalculatorSession.FindElementByName(operation).Click(); + CalculatorSession.FindElementByName(input3).Click(); + CalculatorSession.FindElementByName(input4).Click(); + CalculatorSession.FindElementByName(equals).Click(); + Assert.AreEqual("Display is "+assertion, CalculatorResult.Text); + } + + [TestMethod] + [DataRow("Nine", "Multiply by", "Nine", "Equals", "81 ")] + [DataRow("Eight", "Multiply by", "Nine", "Equals", "72 ")] + [DataRow("Seven", "Multiply by", "Nine", "Equals", "63 ")] + [DataRow("Six", "Multiply by", "Nine", "Equals", "54 ")] + [DataRow("Five", "Multiply by", "Nine", "Equals", "45 ")] + + public void Multiplication_Advanced(string input1, string operation, string input2, string equals, string assertion) + { + CalculatorSession.FindElementByName(input1).Click(); + CalculatorSession.FindElementByName(operation).Click(); + CalculatorSession.FindElementByName(input2).Click(); + CalculatorSession.FindElementByName(equals).Click(); + Assert.AreEqual("Display is " + assertion, CalculatorResult.Text); + } + + [TestMethod] + [DataRow("Nine", "Minus", "Seven", "Equals", "2 ")] + [DataRow("Eight", "Minus", "Six", "Equals", "2 ")] + [DataRow("Seven", "Minus", "One", "Equals", "6 ")] + [DataRow("Six", "Minus", "Three", "Equals", "3 ")] + [DataRow("Five", "Minus", "Four", "Equals", "1 ")] + public void Subtraction_Advanced(string input1, string operation, string input2, string equals, string assertion) + { + CalculatorSession.FindElementByName(input1).Click(); + CalculatorSession.FindElementByName(operation).Click(); + CalculatorSession.FindElementByName(input2).Click(); + CalculatorSession.FindElementByName(equals).Click(); + Assert.AreEqual("Display is "+ assertion, CalculatorResult.Text); + } + } +} diff --git a/Samples/C#/CalculatorTest/CalculatorTest.csproj b/Samples/C#/CalculatorTest/CalculatorTest.csproj index 76f95f22..2fcaf1c2 100644 --- a/Samples/C#/CalculatorTest/CalculatorTest.csproj +++ b/Samples/C#/CalculatorTest/CalculatorTest.csproj @@ -35,10 +35,18 @@ 4 + + packages\MSTest.TestFramework.1.0.6-preview\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + True + + + packages\MSTest.TestFramework.1.0.6-preview\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + True + - - packages\Selenium.WebDriver.2.52.0\lib\net40\WebDriver.dll + + packages\Selenium.WebDriver.3.0.1\lib\net40\WebDriver.dll True @@ -48,13 +56,10 @@ - - - - - + + diff --git a/Samples/C#/CalculatorTest/packages.config b/Samples/C#/CalculatorTest/packages.config index 2344d715..64a1c692 100644 --- a/Samples/C#/CalculatorTest/packages.config +++ b/Samples/C#/CalculatorTest/packages.config @@ -1,4 +1,6 @@ - + - + + + \ No newline at end of file From 23ee1904db38c399b26c939b063b221b55ace416 Mon Sep 17 00:00:00 2001 From: Yosef Durr Date: Wed, 23 Nov 2016 13:23:55 -0800 Subject: [PATCH 6/8] adding note for VS2017 and additional video link --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4ff63a29..ea6c0435 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,9 @@ This Github project provides - issue tracking **Videos about WinAppDriver**
+https://channel9.msdn.com/events/Connect/2016/202 (8min overview with demos)
https://channel9.msdn.com/events/Build/2016/Panel-Engineering-Quality (With Jonathan Lipps!)
-https://channel9.msdn.com/events/Build/2016/P499 (Includes demos)
+https://channel9.msdn.com/events/Build/2016/P499 (Longer discussion)
## Vote on New Features Go to https://wpdev.uservoice.com/forums/110705-universal-windows-platform and enter requests under the **UI Testing** category. @@ -108,7 +109,8 @@ Windows Application Driver supports testing **Universal Windows Platform (UWP)** You can choose any programming language or tools supported by Appium/Selenium to write your test scripts. In the example below, we will author the test script in C# using Microsoft Visual Studio 2015. ### Create Test Project -1. Open **Microsoft Visual Studio 2015** +1. Open **Microsoft Visual Studio 2015 or 2017**
+ NOTE: in Visual Studio 2017 make sure you have the optional “.NET desktop development” workload installed 2. Create the test project and solution. I.e. select **New Project > Templates > Visual C# > Test > Unit Test Project** 3. Once created, select **Project > Manage NuGet Packages... > Browse** and search for **Appium.WebDriver** 4. Install the **Appium.WebDriver** NuGet packages for the test project From 3a9bd77a2f9264c0cf7c4a80805f86e860a7e6f7 Mon Sep 17 00:00:00 2001 From: Ian Ceicys Date: Thu, 24 Nov 2016 18:59:28 -0500 Subject: [PATCH 7/8] Update Readme to fix incorrect comment The code sample is for notepad and was referring to alarmclock --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ea6c0435..bbb8a7f4 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ DesiredCapabilities appCapabilities = new DesiredCapabilities(); appCapabilities.SetCapability("app", @"C:\Windows\System32\notepad.exe"); NotepadSession = new IOSDriver(new Uri("http://127.0.0.1:4723"), appCapabilities); -// Control the AlarmClock app +// Control the Notepad app NotepadSession.FindElementByClassName("Edit").SendKeys("This is some text"); ``` From 53847e1bfa6a41a0d63185868ee2fc088cf91b74 Mon Sep 17 00:00:00 2001 From: Ian Ceicys Date: Mon, 28 Nov 2016 17:58:42 -0500 Subject: [PATCH 8/8] Update README.md to include C# Video Walk through C# Calculator walk through of Calculator Sample and how to work with WinAppDriver. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ea6c0435..095a14e3 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ This Github project provides https://channel9.msdn.com/events/Connect/2016/202 (8min overview with demos)
https://channel9.msdn.com/events/Build/2016/Panel-Engineering-Quality (With Jonathan Lipps!)
https://channel9.msdn.com/events/Build/2016/P499 (Longer discussion)
+https://www.youtube.com/watch?v=XAJVpvaEchY (c# demo with calculator sample walkthrough)
## Vote on New Features Go to https://wpdev.uservoice.com/forums/110705-universal-windows-platform and enter requests under the **UI Testing** category. @@ -46,7 +47,7 @@ WinAppDriver.exe *IP address* *port* For example: 5. If the test app is installed on the remote machine run your test script and see the results! ## C# Samples -1. see Samples/C# in this github project. Open one of the test solutions with Visual Studio 2015. For example, pull and open `CalculatorTest.sln` under [CalculatorTest](https://github.com/Microsoft/WinAppDriver/tree/master/Samples/C%23/CalculatorTest) +1. see Samples/C# in this github project. Take a look at https://www.youtube.com/watch?v=XAJVpvaEchY for a walkthrough of the c# calculator sample. Open one of the test solutions with Visual Studio 2015. For example, pull and open `CalculatorTest.sln` under [CalculatorTest](https://github.com/Microsoft/WinAppDriver/tree/master/Samples/C%23/CalculatorTest) 2. In Visual Studio 2015 with the test solution open build the test and select **Test > Run > All Tests** ## Java Samples