Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import WindowsPhoneDriver as Winium.Silverlight #164

Merged
merged 29 commits into from
Oct 18, 2016
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5b2957e
Prepare project to be merged with winphonedriver
bayandin Oct 10, 2016
d2cacb6
Move InnerServer from winphonedriver
bayandin Oct 10, 2016
ff41881
Fix simple cases
bayandin Oct 11, 2016
89035d8
Add target WinPhone Silverlight 8.1 to Winium.Common
bayandin Oct 11, 2016
fcbdf1a
Add invokeMethod from winphonedriver
bayandin Oct 11, 2016
737198e
Add invokeAppBarItem from winphonedriver
bayandin Oct 11, 2016
a4d5f81
Rename InnerDriver -> InnerServer
bayandin Oct 11, 2016
df97b89
Change logic for deviceName matching
bayandin Oct 11, 2016
d042560
Fix reference in tests
bayandin Oct 11, 2016
df2ff2a
Change *.ConnectionInformation.json filename
bayandin Oct 11, 2016
2be1a03
Cleanup code from outer/inner driver mentions. Bump copyright year
bayandin Oct 12, 2016
01ed6a7
Rename TestApp -> TestApp.StoredApps. Fix references
bayandin Oct 12, 2016
1a5fc91
Fix returning value for invokeMethod & invokeAppBarItem
bayandin Oct 12, 2016
f291a79
Add TestApp from winphonedriver as TestApp.Silverlight
bayandin Oct 12, 2016
3f9e1c7
Add functional tests for silverlight server
bayandin Oct 13, 2016
b92c814
Fix app path for functional tests for silverlight
bayandin Oct 13, 2016
e65d3de
Remove unused configurations
Oct 14, 2016
f133ca5
Deprecate fallback to 9998 port and NoFallback capability
Oct 14, 2016
629ffd0
Add port and framework info to test apps UI
Oct 14, 2016
c37bac3
Fix tests_silverlight to use correct config
Oct 14, 2016
fe02f4f
Fix TestApp.Silverlight
bayandin Oct 14, 2016
0e30af2
Fix InvokeAppBarItem command, refactor ExecuteScript
Oct 15, 2016
7e1197d
Fix file ops test for Silverlight
Oct 15, 2016
95b7c81
Fix IsDisplayed command on Silverlight
Oct 15, 2016
1a6c5f9
Update tests configs and running scripts
Oct 15, 2016
8e20bbb
Add Winium.Silverlight to service scripts
bayandin Oct 16, 2016
838a8d9
Rename output directory Bin\ -> bin\
bayandin Oct 16, 2016
fc500ab
Mention Winium.Silverlight in READMEs
bayandin Oct 16, 2016
09adafe
Add a line to CHANGELOG
bayandin Oct 16, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Winium/TestApp.Test/py-functional/run_tests.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ IF [%RELEASE%] == [1] (SET CONFIGURATION=Release) else (SET CONFIGURATION=Debug)

echo %CONFIGURATION%

REM Run Winium.StoreApps.Driver.exe
start ..\..\Winium.StoreApps.Driver\bin\x86\%CONFIGURATION%\Winium.StoreApps.Driver.exe
REM Run Winium.Mobile.Driver.exe
start ..\..\Winium.Mobile.Driver\bin\x86\%CONFIGURATION%\Winium.Mobile.Driver.exe

REM Run tests
pip install -r requirements.txt
py.test tests --tb=native -s --junitxml=junit-result.xml
SET RV=%ERRORLEVEL%

taskkill /im Winium.StoreApps.Driver.exe /f
taskkill /im Winium.Mobile.Driver.exe /f

EXIT %RV% /B
6 changes: 3 additions & 3 deletions Winium/TestApp.Test/py-functional/run_tests_remote.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
REM Run Winium.StoreApps.Driver.exe
start ..\..\Winium.StoreApps.Driver\bin\x86\Release\Winium.StoreApps.Driver.exe
REM Run Winium.Mobile.Driver.exe
start ..\..\Winium.Mobile.Driver\bin\x86\Release\Winium.Mobile.Driver.exe

REM Run tests
pip install -r requirements.txt
py.test tests --tb=native -s --junitxml=junit-result.xml

taskkill /im Winium.StoreApps.Driver.exe /f
taskkill /im Winium.Mobile.Driver.exe /f
taskkill /im XDE.exe /f
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Winium.StoreApps.Common
namespace Winium.Mobile.Common
{
#region

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Winium.StoreApps.Common
namespace Winium.Mobile.Common
{
public class CommandInfo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Winium.StoreApps.Common
namespace Winium.Mobile.Common
{
#region

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Winium.StoreApps.Common.CommandSettings
namespace Winium.Mobile.Common.CommandSettings
{
#region

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Winium.StoreApps.Common.CommandSettings
namespace Winium.Mobile.Common.CommandSettings
{
#region

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace Winium.StoreApps.Common
namespace Winium.Mobile.Common
{
public class ConnectionInformation
{
#region Public Properties

public const string FileName = ".Winium.StoreApps.ConnectionInformation.json";
public const string FileName = ".Winium.Mobile.ConnectionInformation.json";
Copy link
Contributor

@NickAb NickAb Oct 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should look into backwards compatibility and support both names for a couple of releases. If new file is not found, then it should fallback to the old one and log warning message.

Copy link
Contributor Author

@bayandin bayandin Oct 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't say that this is backwards compatibility issue. Public API wasn't changed. Do we support work for different driver/server versions?
Will have a look at this case later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will take a look at this myself. It would be nice to have a gradual transition if it easy to implement. Else we should include some useful message if not connection file was found, so it would be easy to pinpoint the problem of incompatible driver and inner server by end user, who might have messed with versions of inner and outer parts.


public string RemotePort { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copied from OpenQA
namespace Winium.StoreApps.Common
namespace Winium.Mobile.Common
{
/// <summary>
/// Values describing the list of commands understood by a remote server using the JSON wire protocol.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Winium.StoreApps.Common.Exceptions
namespace Winium.Mobile.Common.Exceptions
{
#region

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Winium.StoreApps.Common.Exceptions
namespace Winium.Mobile.Common.Exceptions
{
#region

Expand All @@ -7,26 +7,26 @@

#endregion

public class InnerDriverRequestException : Exception
public class InnerServerRequestException : Exception
{
#region Constructors and Destructors

public InnerDriverRequestException()
public InnerServerRequestException()
{
}

public InnerDriverRequestException(string message, HttpStatusCode statusCode)
public InnerServerRequestException(string message, HttpStatusCode statusCode)
: base(message)
{
this.StatusCode = statusCode;
}

public InnerDriverRequestException(string message, params object[] args)
public InnerServerRequestException(string message, params object[] args)
: base(string.Format(message, args))
{
}

public InnerDriverRequestException(string message, Exception innerException)
public InnerServerRequestException(string message, Exception innerException)
: base(message, innerException)
{
}
Expand Down
10 changes: 10 additions & 0 deletions Winium/Winium.Mobile.Common/ExtendedCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Winium.Mobile.Common
{
public static class ExtendedDriverCommand
{
#region Static Fields

public static readonly string InvokeAppBarItemCommand = "invokeAppBarItem";
#endregion
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Winium.StoreApps.Common
namespace Winium.Mobile.Common
{
#region

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Winium.StoreApps.Common
namespace Winium.Mobile.Common
{
#region using

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated />
namespace Winium.StoreApps.Common
namespace Winium.Mobile.Common
{
#region

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
// 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("Winium.StoreApps.Common")]
[assembly: AssemblyTitle("Winium.Mobile.Common")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Winium.StoreApps.Common")]
[assembly: AssemblyProduct("Winium.Mobile.Common")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Winium.StoreApps.Common
namespace Winium.Mobile.Common
{
public enum ResponseStatus
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why visual studio version has been downgraded? What version of VS did you use to make changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have no idea why VS has decided to downgrade it. It happened when I added target for WP Silverlight 8.1
I use VS Enterprise 2015 (14.0.25431.01 Update 3).

<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3C8D0B9C-576B-4778-97B1-6839AA944AEE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Winium.StoreApps.Common</RootNamespace>
<AssemblyName>Winium.StoreApps.Common</AssemblyName>
<RootNamespace>Winium.Mobile.Common</RootNamespace>
<AssemblyName>Winium.Mobile.Common</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile>Profile151</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it because of Silverlight support?

Copy link
Contributor Author

@bayandin bayandin Oct 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so. I'm not an expert in build target in VS I see this and can't change any version:

screenshot 2016-10-12 11 04 29

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please try to add target for Silverlight by yourself (you need to replace 89035d8 commit)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will check this.

<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
Expand Down Expand Up @@ -43,7 +43,8 @@
<Compile Include="ConnectionInformation.cs" />
<Compile Include="DriverCommand.cs" />
<Compile Include="Exceptions\AutomationException.cs" />
<Compile Include="Exceptions\InnerDriverRequestException.cs" />
<Compile Include="Exceptions\InnerServerRequestException.cs" />
<Compile Include="ExtendedCommand.cs" />
<Compile Include="HttpResponseHelper.cs" />
<Compile Include="CommandSettings\CommandSettings.cs" />
<Compile Include="JsonErrorCodes.cs" />
Expand All @@ -52,8 +53,9 @@
<Compile Include="ResponseStatus.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\portable-net40+sl5+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions Winium/Winium.Mobile.Common/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="portable45-net45+win8+wp8+wpa81" />
</packages>
4 changes: 2 additions & 2 deletions Winium/Winium.Mobile.Connectivity/Deployer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ namespace Winium.Mobile.Connectivity
using Microsoft.SmartDevice.Connectivity.Interface;
using Microsoft.SmartDevice.MultiTargeting.Connectivity;

using Winium.StoreApps.Common.Exceptions;
using Winium.StoreApps.Logging;
using Winium.Mobile.Common.Exceptions;
using Winium.Mobile.Logging;

using DeviceInfo = Microsoft.Phone.Tools.Deploy.Patched.DeviceInfo;
using Utils = Microsoft.Phone.Tools.Deploy.Patched.Utils;
Expand Down
13 changes: 6 additions & 7 deletions Winium/Winium.Mobile.Connectivity/Devices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,12 @@ public static Devices Instance
public DeviceInfo GetMatchingDevice(string desiredName, bool strict)
{
DeviceInfo deviceInfo;
if (strict)
{
deviceInfo =
this.AvailableDevices.FirstOrDefault(
x => x.ToString().Equals(desiredName, StringComparison.OrdinalIgnoreCase));
}
else

deviceInfo =
this.AvailableDevices.FirstOrDefault(
x => x.ToString().Equals(desiredName, StringComparison.OrdinalIgnoreCase));

if (!strict && deviceInfo == null)
{
deviceInfo =
this.AvailableDevices.FirstOrDefault(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
using Microsoft.Xde.Wmi;

using Winium.Mobile.Connectivity.Gestures;
using Winium.StoreApps.Common;
using Winium.StoreApps.Common.Exceptions;
using Common;
using Common.Exceptions;

#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Xde.Common;
using Microsoft.Xde.Wmi;

using Winium.StoreApps.Logging;
using Winium.Mobile.Logging;

#endregion

Expand Down
2 changes: 1 addition & 1 deletion Winium/Winium.Mobile.Connectivity/Retry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using System;

using Winium.StoreApps.Logging;
using Winium.Mobile.Logging;

#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@
<Project>{13B4DF5C-E542-4A7A-8F00-929D423B522C}</Project>
<Name>Microsoft.Phone.Tools.Deploy.Patched</Name>
</ProjectReference>
<ProjectReference Include="..\Winium.StoreApps.Common\Winium.StoreApps.Common.csproj">
<ProjectReference Include="..\Winium.Mobile.Common\Winium.Mobile.Common.csproj">
<Project>{3C8D0B9C-576B-4778-97B1-6839AA944AEE}</Project>
<Name>Winium.StoreApps.Common</Name>
<Name>Winium.Mobile.Common</Name>
</ProjectReference>
<ProjectReference Include="..\Winium.StoreApps.Logging\Winium.StoreApps.Logging.csproj">
<ProjectReference Include="..\Winium.Mobile.Logging\Winium.Mobile.Logging.csproj">
<Project>{DAC0EAFE-2FE0-4F33-B173-736C1BAFD707}</Project>
<Name>Winium.StoreApps.Logging</Name>
<Name>Winium.Mobile.Logging</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Winium.StoreApps.Driver.Tests
namespace Winium.Mobile.Driver.Tests
{
#region

Expand All @@ -8,7 +8,7 @@

using NUnit.Framework;

using Winium.StoreApps.Driver.CommandHelpers;
using Winium.Mobile.Driver.CommandHelpers;

#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
// 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("Winium.StoreApps.Driver.Tests")]
[assembly: AssemblyTitle("Winium.Mobile.Driver.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Winium.StoreApps.Driver.Tests")]
[assembly: AssemblyProduct("Winium.Mobile.Driver.Tests")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<ProjectGuid>{07168ED9-C12A-43F5-898F-84AB113A9441}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Winium.StoreApps.Driver.Tests</RootNamespace>
<AssemblyName>Winium.StoreApps.Driver.Tests</AssemblyName>
<RootNamespace>Winium.Mobile.Driver.Tests</RootNamespace>
<AssemblyName>Winium.Mobile.Driver.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Expand Down Expand Up @@ -66,9 +66,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Winium.StoreApps.Driver\Winium.StoreApps.Driver.csproj">
<ProjectReference Include="..\Winium.Mobile.Driver\Winium.Mobile.Driver.csproj">
<Project>{B6BE579B-B008-45B2-9740-12F0E6223661}</Project>
<Name>Winium.StoreApps.Driver</Name>
<Name>Winium.Mobile.Driver</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Winium.StoreApps.Driver.Automator
namespace Winium.Mobile.Driver.Automator
{
#region

Expand All @@ -15,10 +15,10 @@

using Winium.Mobile.Connectivity;
using Winium.Mobile.Connectivity.Emulator;
using Winium.StoreApps.Common;
using Winium.StoreApps.Common.Exceptions;
using Winium.StoreApps.Driver.CommandHelpers;
using Winium.StoreApps.Logging;
using Winium.Mobile.Common;
using Winium.Mobile.Common.Exceptions;
using Winium.Mobile.Driver.CommandHelpers;
using Winium.Mobile.Logging;

#endregion

Expand Down
Loading