From 69fdb44b1d06582ad2ddbe6275c2bb4d153f933f Mon Sep 17 00:00:00 2001 From: Nick Abalov Date: Thu, 16 Jul 2015 14:25:27 +0600 Subject: [PATCH 01/12] Introduce WiniumElement to wrap FrameworkElement --- Winium/TestApp.Test/py-functional/config.py | 2 +- .../TestApp.WindowsPhone/MainPage.xaml | 1 + .../TestApp.WindowsPhone/MainPage.xaml.cs | 11 ++ .../Winium.StoreApps.InnerServer/Automator.cs | 4 - .../Commands/ClickCommand.cs | 34 ---- .../Commands/DisplayedCommand.cs | 4 +- .../Commands/ElementCommand.cs | 49 ++--- .../Commands/ElementsCommand.cs | 45 ++--- .../Commands/ExecuteCommand.cs | 3 +- .../Commands/GetElementAttributeCommand.cs | 4 +- .../Helpers/FrameworkElementExtensions.cs | 181 ------------------ .../Commands/LocationCommand.cs | 4 +- .../Commands/LocationInViewCommand.cs | 3 +- .../Commands/PageSourceCommand.cs | 41 ++-- .../Commands/TextCommand.cs | 4 +- .../Element/ISearchable.cs | 27 +++ .../Element/WiniumElement.Find.cs | 59 ++++++ .../Element/WiniumElement.GetSetAttribute.cs | 86 +++++++++ .../Element/WiniumElement.GetText.cs | 37 ++++ .../Element/WiniumElement.IsUserVisible.cs | 87 +++++++++ .../Element/WiniumElement.Location.cs | 59 ++++++ .../Element/WiniumElement.cs | 82 ++++++++ .../Element/WiniumVirtualRoot.cs | 118 ++++++++++++ .../Winium.StoreApps.InnerServer.csproj | 9 +- 24 files changed, 635 insertions(+), 319 deletions(-) delete mode 100644 Winium/Winium.StoreApps.InnerServer/Commands/ClickCommand.cs create mode 100644 Winium/Winium.StoreApps.InnerServer/Element/ISearchable.cs create mode 100644 Winium/Winium.StoreApps.InnerServer/Element/WiniumElement.Find.cs create mode 100644 Winium/Winium.StoreApps.InnerServer/Element/WiniumElement.GetSetAttribute.cs create mode 100644 Winium/Winium.StoreApps.InnerServer/Element/WiniumElement.GetText.cs create mode 100644 Winium/Winium.StoreApps.InnerServer/Element/WiniumElement.IsUserVisible.cs create mode 100644 Winium/Winium.StoreApps.InnerServer/Element/WiniumElement.Location.cs create mode 100644 Winium/Winium.StoreApps.InnerServer/Element/WiniumElement.cs create mode 100644 Winium/Winium.StoreApps.InnerServer/Element/WiniumVirtualRoot.cs diff --git a/Winium/TestApp.Test/py-functional/config.py b/Winium/TestApp.Test/py-functional/config.py index 981713f..aa40cff 100644 --- a/Winium/TestApp.Test/py-functional/config.py +++ b/Winium/TestApp.Test/py-functional/config.py @@ -7,6 +7,6 @@ 'TestApp.WindowsPhone_1.0.0.0_AnyCPU{0}.appx'.format(CONFIG_IDENTIFIER) DESIRED_CAPABILITIES = { - "app": os.path.abspath(os.path.join(BASE_DIR, APPX_PATH)) + "app": os.path.abspath(os.path.join(BASE_DIR, APPX_PATH)), # "debugConnectToRunningApp": True } diff --git a/Winium/TestApp/TestApp.WindowsPhone/MainPage.xaml b/Winium/TestApp/TestApp.WindowsPhone/MainPage.xaml index 19023e9..e761f3a 100644 --- a/Winium/TestApp/TestApp.WindowsPhone/MainPage.xaml +++ b/Winium/TestApp/TestApp.WindowsPhone/MainPage.xaml @@ -42,6 +42,7 @@ TextChanged="SuggestionsTextChanged" SuggestionChosen="SuggestionsSuggestionChosen"> +