Skip to content

Commit 658c37b

Browse files
committed
updated demo project to match recent changes.
1 parent 98060c2 commit 658c37b

3 files changed

Lines changed: 21 additions & 22 deletions

File tree

ApplitoolsTutorial/ApplitoolsTutorial.csproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<PropertyGroup>
3+
<PropertyGroup>
44
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
77
<ProjectGuid>{E2A51DD0-EB96-4E33-90B3-679B912B0337}</ProjectGuid>
88
<OutputType>Exe</OutputType>
99
<RootNamespace>ApplitoolsTutorial</RootNamespace>
1010
<AssemblyName>ApplitoolsTutorial</AssemblyName>
11-
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
11+
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
1212
</PropertyGroup>
1313
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
1414
<DebugSymbols>true</DebugSymbols>
@@ -30,16 +30,22 @@
3030
<PlatformTarget>x86</PlatformTarget>
3131
</PropertyGroup>
3232
<ItemGroup>
33+
<Reference Include="CssParser, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
34+
<HintPath>..\packages\Eyes.Selenium.2.21.15-beta\lib\net45\CssParser.dll</HintPath>
35+
</Reference>
36+
<Reference Include="Eyes.Sdk.DotNet, Version=2.21.15.0, Culture=neutral, processorArchitecture=MSIL">
37+
<HintPath>..\packages\Eyes.Sdk.2.21.15-beta\lib\net45\Eyes.Sdk.DotNet.dll</HintPath>
38+
</Reference>
39+
<Reference Include="Eyes.Selenium.DotNet, Version=2.21.15.0, Culture=neutral, processorArchitecture=MSIL">
40+
<HintPath>..\packages\Eyes.Selenium.2.21.15-beta\lib\net45\Eyes.Selenium.DotNet.dll</HintPath>
41+
</Reference>
3342
<Reference Include="System" />
3443
<Reference Include="Ionic.Zip.Reduced">
3544
<HintPath>..\packages\DotNetZip.Reduced.1.9.1.8\lib\net20\Ionic.Zip.Reduced.dll</HintPath>
3645
</Reference>
3746
<Reference Include="Newtonsoft.Json">
3847
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
3948
</Reference>
40-
<Reference Include="Eyes.Sdk.DotNet">
41-
<HintPath>..\packages\Eyes.Sdk.2.21.14-beta\lib\net45\Eyes.Sdk.DotNet.dll</HintPath>
42-
</Reference>
4349
<Reference Include="System.Management" />
4450
<Reference Include="System.Web" />
4551
<Reference Include="System.Windows.Forms" />
@@ -53,12 +59,6 @@
5359
<Reference Include="mscorlib" />
5460
<Reference Include="System.ComponentModel.Composition" />
5561
<Reference Include="System.Core" />
56-
<Reference Include="CssParser">
57-
<HintPath>..\packages\Eyes.Sdk.2.21.14-beta\lib\net45\CssParser.dll</HintPath>
58-
</Reference>
59-
<Reference Include="Eyes.Selenium.DotNet">
60-
<HintPath>..\packages\Eyes.Selenium.2.21.14-beta\lib\net45\Eyes.Selenium.DotNet.dll</HintPath>
61-
</Reference>
6262
</ItemGroup>
6363
<ItemGroup>
6464
<Compile Include="Program.cs" />

ApplitoolsTutorial/Program.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
using Applitools.VisualGrid;
44
using OpenQA.Selenium;
55
using OpenQA.Selenium.Chrome;
6-
using static Applitools.Configuration;
7-
using static Applitools.VisualGrid.ChromeEmulationInfo;
86
using Configuration = Applitools.Selenium.Configuration;
97
using ScreenOrientation = Applitools.VisualGrid.ScreenOrientation;
108

@@ -25,7 +23,7 @@ private void Run()
2523
IWebDriver webDriver = new ChromeDriver();
2624

2725
// Navigate to the url we want to test
28-
webDriver.Url = "https:/demo.applitools.com";
26+
webDriver.Url = "https://demo.applitools.com";
2927

3028
// ⭐️ Note to see visual bugs, run the test using the above URL for the 1st run.
3129
//but then change the above URL to https://demo.applitools.com/index_v2.html (for the 2nd run)
@@ -41,19 +39,19 @@ private void Run()
4139

4240

4341

44-
// Set the Applitools API KEY here or as an environment variable "APPLITOOLS_API_KEY"
45-
conf.SetApiKey("APPLITOOLS_API_KEY")
46-
.SetTestName("C# VisualGrid demo") // Set test name
42+
43+
//conf.SetApiKey("APPLITOOLS_API_KEY"); // Set the Applitools API KEY here or as an environment variable "APPLITOOLS_API_KEY"
44+
conf.SetTestName("C# VisualGrid demo") // Set test name
4745
.SetAppName("Demo app"); // Set app name
4846

49-
// Add different browsers with different viewports
47+
// Add browsers with different viewports
5048
conf.AddBrowser(800, 600, BrowserType.CHROME);
5149
conf.AddBrowser(700, 500, BrowserType.CHROME);
5250
conf.AddBrowser(1200, 800, BrowserType.FIREFOX);
5351
conf.AddBrowser(1600, 1200, BrowserType.FIREFOX);
5452

5553
// Add iPhone 4 device emulation in Portraig mode
56-
ChromeEmulationInfo iphone4 = new ChromeEmulationInfo(DeviceNameEnum.iPhone_4, ScreenOrientation.Portrait);
54+
ChromeEmulationInfo iphone4 = new ChromeEmulationInfo(DeviceName.iPhone_4, ScreenOrientation.Portrait);
5755
conf.AddDeviceEmulation(iphone4);
5856

5957

@@ -74,6 +72,7 @@ private void Run()
7472
// Close the browser
7573
webDriver.Quit();
7674

75+
eyes.Close();
7776
//Wait and collect all test results
7877
TestResultSummary allTestResults = runner.GetAllTestResults();
7978
System.Console.WriteLine(allTestResults);

ApplitoolsTutorial/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<packages>
33
<package id="Castle.Core" version="4.3.1" targetFramework="net461" />
44
<package id="DotNetZip.Reduced" version="1.9.1.8" targetFramework="net461" />
5-
<package id="Eyes.Sdk" version="2.21.14-beta" targetFramework="net47" />
6-
<package id="Eyes.Selenium" version="2.21.14-beta" targetFramework="net47" />
5+
<package id="Eyes.Sdk" version="2.21.15-beta" targetFramework="net471" />
6+
<package id="Eyes.Selenium" version="2.21.15-beta" targetFramework="net471" />
77
<package id="log4net" version="2.0.8" targetFramework="net461" />
88
<package id="Microsoft.CodedUI.Framework" version="2.0.0" targetFramework="net461" />
99
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net47" />

0 commit comments

Comments
 (0)