Skip to content

Commit abf7eb7

Browse files
committed
Update CortanaTest sample to align with the latest Start Menu panel
Update CortanaTest README.md with new running requirements and steps Update CortanaTest to use more recent NuGet packages
1 parent 58a513e commit abf7eb7

File tree

4 files changed

+26
-29
lines changed

4 files changed

+26
-29
lines changed

Samples/C#/CortanaTest/BingSearch.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public void LocalSearch()
4141
Assert.IsNotNull(bingPane);
4242

4343
// Verify that a shortcut to "System settings Add or remove programs" is shown as a search result
44-
var bingResult = bingPane.FindElementByXPath("//DataItem[starts-with(@Name, \"Add or remove\")]");
44+
var bingResult = bingPane.FindElementByXPath("//ListItem[starts-with(@Name, \"Add or remove\")]");
4545
Assert.IsNotNull(bingResult);
46-
Assert.IsTrue(bingResult.Text.EndsWith("System settings"));
46+
Assert.IsTrue(bingResult.Text.Contains("System settings"));
4747
}
4848

4949
[TestMethod]
@@ -100,7 +100,7 @@ public static void Setup(TestContext context)
100100
Assert.IsNotNull(cortanaSession);
101101

102102
// Set implicit timeout to 5 seconds to make element search to retry every 500 ms for at most ten times
103-
cortanaSession.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5));
103+
cortanaSession.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
104104
}
105105

106106
[ClassCleanup]

Samples/C#/CortanaTest/CortanaTest.csproj

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,23 @@
3535
<WarningLevel>4</WarningLevel>
3636
</PropertyGroup>
3737
<ItemGroup>
38-
<Reference Include="appium-dotnet-driver, Version=3.0.0.1, Culture=neutral, processorArchitecture=MSIL">
39-
<HintPath>packages\Appium.WebDriver.3.0.0.1\lib\net45\appium-dotnet-driver.dll</HintPath>
40-
<Private>True</Private>
38+
<Reference Include="appium-dotnet-driver, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
39+
<HintPath>packages\Microsoft.WinAppDriver.Appium.WebDriver.1.0.1-Preview\lib\net45\appium-dotnet-driver.dll</HintPath>
4140
</Reference>
42-
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
43-
<HintPath>packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
44-
<Private>True</Private>
41+
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
42+
<HintPath>packages\Castle.Core.4.2.1\lib\net45\Castle.Core.dll</HintPath>
4543
</Reference>
46-
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
47-
<HintPath>packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
48-
<Private>True</Private>
44+
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
45+
<HintPath>packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
4946
</Reference>
5047
<Reference Include="System" />
48+
<Reference Include="System.Configuration" />
5149
<Reference Include="System.Drawing" />
52-
<Reference Include="WebDriver, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
53-
<HintPath>packages\Selenium.WebDriver.3.0.1\lib\net40\WebDriver.dll</HintPath>
54-
<Private>True</Private>
50+
<Reference Include="WebDriver, Version=3.8.0.0, Culture=neutral, processorArchitecture=MSIL">
51+
<HintPath>packages\Selenium.WebDriver.3.8.0\lib\net45\WebDriver.dll</HintPath>
5552
</Reference>
56-
<Reference Include="WebDriver.Support, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
57-
<HintPath>packages\Selenium.Support.3.0.1\lib\net40\WebDriver.Support.dll</HintPath>
58-
<Private>True</Private>
53+
<Reference Include="WebDriver.Support, Version=3.8.0.0, Culture=neutral, processorArchitecture=MSIL">
54+
<HintPath>packages\Selenium.Support.3.8.0\lib\net45\WebDriver.Support.dll</HintPath>
5955
</Reference>
6056
</ItemGroup>
6157
<Choose>

Samples/C#/CortanaTest/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@ This test project highlights the following Windows Application Driver feature.
1212

1313
## Requirements
1414

15-
- Windows 10 PC with the latest Windows 10 version (Version 1607 or later)
16-
- Microsoft Visual Studio 2015 or later
15+
- Windows 10 PC with the latest Windows 10 version (Version 1809 or later)
16+
- Microsoft Visual Studio 2017 or later
1717

1818

1919
## Getting Started
2020

21-
1. Open `CortanaTest.sln` in Visual Studio
22-
2. Select **Test** > **Windows** > **Test Explorer**
23-
3. Select **Run All** on the test pane or through menu **Test** > **Run** > **All Tests**
21+
1. [Run](../../../README.md#installing-and-running-windows-application-driver) `WinAppDriver.exe` on the test device
22+
2. Open `CortanaTest.sln` in Visual Studio
23+
3. Select **Build** > **Rebuild Solution**
24+
4. Select **Test** > **Windows** > **Test Explorer**
25+
5. Select **Run All** on the test pane or through menu **Test** > **Run** > **All Tests**
2426

2527
> Once the project is successfully built, you can use the **TestExplorer** to pick and choose the test scenario(s) to run
2628
27-
2829
## Adding/Updating Test Scenario
2930

3031
Please follow the guidelines below to maintain test reliability and conciseness:
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Appium.WebDriver" version="3.0.0.1" targetFramework="net45" />
4-
<package id="Castle.Core" version="3.3.3" targetFramework="net45" />
5-
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
6-
<package id="Selenium.Support" version="3.0.1" targetFramework="net45" />
7-
<package id="Selenium.WebDriver" version="3.0.1" targetFramework="net45" />
3+
<package id="Castle.Core" version="4.2.1" targetFramework="net45" />
4+
<package id="Microsoft.WinAppDriver.Appium.WebDriver" version="1.0.1-Preview" targetFramework="net45" />
5+
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net45" />
6+
<package id="Selenium.Support" version="3.8.0" targetFramework="net45" />
7+
<package id="Selenium.WebDriver" version="3.8.0" targetFramework="net45" />
88
</packages>

0 commit comments

Comments
 (0)