From e2dbb3765d21fbacc732d669648ba15163406b50 Mon Sep 17 00:00:00 2001 From: Ritro Date: Sun, 17 Mar 2013 14:33:21 +0400 Subject: [PATCH 1/3] Comments to many methods, mainly about exceptions. --- src/TestStack.White/Application.cs | 27 ++++++++-- .../Factory/ChildWindowFactory.cs | 1 + src/TestStack.White/Factory/WindowFactory.cs | 6 +++ src/TestStack.White/UIItems/IUIItem.cs | 9 ++++ .../UIItems/IUIItemContainer.cs | 53 +++++++++++++++++-- src/TestStack.White/UIItems/ListViewCells.cs | 1 + src/TestStack.White/UIItems/SelectionItem.cs | 1 + src/TestStack.White/UIItems/TextBox.cs | 4 +- .../UIItems/UIItemContainer.cs | 42 +++------------ .../UIItems/WindowItems/Window.cs | 13 +++++ 10 files changed, 114 insertions(+), 43 deletions(-) diff --git a/src/TestStack.White/Application.cs b/src/TestStack.White/Application.cs index eefe533a..f4db8cc3 100644 --- a/src/TestStack.White/Application.cs +++ b/src/TestStack.White/Application.cs @@ -40,6 +40,8 @@ private Application(Process process) /// /// location of the executable /// + /// + /// when some error occured public static Application Launch(string executable) { var processStartInfo = new ProcessStartInfo(executable); @@ -51,6 +53,8 @@ public static Application Launch(string executable) /// /// /// + /// + /// when some error occured public static Application Launch(ProcessStartInfo processStartInfo) { if (string.IsNullOrEmpty(processStartInfo.WorkingDirectory)) processStartInfo.WorkingDirectory = "."; @@ -93,10 +97,18 @@ public static Application Launch(ProcessStartInfo processStartInfo) /// /// /// + /// when process not found public static Application Attach(int processId) { - Process process = Process.GetProcessById(processId); - if (process == null) throw new WhiteException("Could not find process with id: " + processId); + Process process = null; + try + { + process = Process.GetProcessById(processId); + } + catch (System.ArgumentException e) + { + throw new WhiteException("Could not find process with id: " + processId, e); + } return new Application(process); } @@ -115,6 +127,7 @@ public static Application Attach(Process process) /// /// /// + /// when process is not found public static Application Attach(string executable) { Process[] processes = Process.GetProcessesByName(executable); @@ -127,6 +140,9 @@ public static Application Attach(string executable) /// /// /// + /// + /// + /// when some error occured public static Application AttachOrLaunch(ProcessStartInfo processStartInfo) { string processName = ReplaceLast(processStartInfo.FileName, ".exe", string.Empty); @@ -165,6 +181,7 @@ public virtual ApplicationSession ApplicationSession /// Title text of window displayed on desktop /// Option which would be used to initialize the window. /// + /// if your framework is not supported public virtual Window GetWindow(string title, InitializeOption option) { WindowSession windowSession = applicationSession.WindowSession(option); @@ -172,10 +189,11 @@ public virtual Window GetWindow(string title, InitializeOption option) } /// - /// Get visible window + /// Get visible window. NoCache option is set by default /// /// Title text of window displayed on desktop /// + /// if your framework is not supported public virtual Window GetWindow(string title) { return GetWindow(title, InitializeOption.NoCache); @@ -187,6 +205,7 @@ public virtual Window GetWindow(string title) /// /// found window would be initialized with this option /// + /// if your framework is not supported public virtual Window GetWindow(SearchCriteria searchCriteria, InitializeOption initializeOption) { WindowSession windowSession = applicationSession.WindowSession(initializeOption); @@ -234,6 +253,7 @@ public virtual void Kill() /// All windows belonging to the application /// /// + /// if your framework is not supported public virtual List GetWindows() { return windowFactory.DesktopWindows(process, new NoApplicationSession()); @@ -289,6 +309,7 @@ public virtual void WaitWhileBusy() /// /// /// option for the window which matches the condition + /// if your framework is not supported public virtual Window Find(Predicate match, InitializeOption initializeOption) { WindowSession windowSession = applicationSession.WindowSession(initializeOption); diff --git a/src/TestStack.White/Factory/ChildWindowFactory.cs b/src/TestStack.White/Factory/ChildWindowFactory.cs index d17d5b58..c9ff3f8b 100644 --- a/src/TestStack.White/Factory/ChildWindowFactory.cs +++ b/src/TestStack.White/Factory/ChildWindowFactory.cs @@ -44,6 +44,7 @@ protected virtual AutomationElement WaitTillFound(Func find, return element; } + /// if your framework is not supported internal static Window Create(AutomationElement element, InitializeOption option, WindowSession windowSession) { SpecializedWindowFactory specializedWindowFactory = SpecializedWindowFactories.Find(factory => factory.DoesSpecializeInThis(element)); diff --git a/src/TestStack.White/Factory/WindowFactory.cs b/src/TestStack.White/Factory/WindowFactory.cs index c0bfee0f..9ce64562 100644 --- a/src/TestStack.White/Factory/WindowFactory.cs +++ b/src/TestStack.White/Factory/WindowFactory.cs @@ -68,6 +68,7 @@ public virtual Window SplashWindow(Process process) return new SplashWindow(element, InitializeOption.NoCache); } + /// if your framework is not supported public virtual Window CreateWindow(string title, Process process, InitializeOption option, WindowSession windowSession) { var message = string.Format("Couldn't find window with title {0} in process {1}{2}", title, process.Id, ", after waiting for 30 seconds"); @@ -75,6 +76,7 @@ public virtual Window CreateWindow(string title, Process process, InitializeOpti return Create(element, option, windowSession); } + /// if your framework is not supported public virtual Window CreateWindow(SearchCriteria searchCriteria, Process process, InitializeOption option, WindowSession windowSession) { var message = string.Format("Couldn't find window with SearchCriteria {0} in process {1}{2}", searchCriteria, process.Id, Constants.BusyMessage); @@ -82,6 +84,7 @@ public virtual Window CreateWindow(SearchCriteria searchCriteria, Process proces return Create(element, option, windowSession); } + /// if your framework is not supported public virtual Window FindWindow(Process process, Predicate match, InitializeOption initializeOption, WindowSession windowSession) { string message = string.Format("Could not find window matching condition. ProcessName: {0}, ProcessId: {1}, MatchingConditionMethod: {2}, MatchingConditionTarget: {3}", process.ProcessName, process.Id, match.Method, match.Target); @@ -89,6 +92,7 @@ public virtual Window FindWindow(Process process, Predicate match, Initi return Create(foundElement, initializeOption, windowSession); } + /// if your framework is not supported public virtual Window FindModalWindow(string title, Process process, InitializeOption option, AutomationElement parentWindowElement, WindowSession windowSession) { @@ -98,6 +102,7 @@ public virtual Window FindModalWindow(string title, Process process, InitializeO return Create(modalWindowElement, option, windowSession); } + /// if your framework is not supported public virtual Window FindModalWindow(SearchCriteria searchCriteria, InitializeOption option, AutomationElement parentWindowElement, WindowSession windowSession) { var windowFinder = new AutomationElementFinder(parentWindowElement); @@ -132,6 +137,7 @@ private AutomationElement FindWindowElement(Process process, Predicate m }); } + /// if your framework is not supported public virtual List DesktopWindows() { var windows = new List(); diff --git a/src/TestStack.White/UIItems/IUIItem.cs b/src/TestStack.White/UIItems/IUIItem.cs index 73b3edee..187520ce 100644 --- a/src/TestStack.White/UIItems/IUIItem.cs +++ b/src/TestStack.White/UIItems/IUIItem.cs @@ -95,4 +95,13 @@ public interface IUIItem : ActionListener void Enter(string value); } + + /// + /// Class which inherits this interface has a mapping to it's Automation type. + /// Used for search constraints. + /// + public interface IMappableUIItem + { + + } } \ No newline at end of file diff --git a/src/TestStack.White/UIItems/IUIItemContainer.cs b/src/TestStack.White/UIItems/IUIItemContainer.cs index 1ecd9d99..5e9cc01b 100644 --- a/src/TestStack.White/UIItems/IUIItemContainer.cs +++ b/src/TestStack.White/UIItems/IUIItemContainer.cs @@ -4,11 +4,58 @@ namespace TestStack.White.UIItems { public interface IUIItemContainer : IUIItem { - T Get() where T : UIItem; - T Get(string primaryIdentification) where T : UIItem; - T Get(SearchCriteria searchCriteria) where T : UIItem; ToolTip ToolTip { get; } ToolTip GetToolTipOn(UIItem uiItem); IUIItem[] GetMultiple(SearchCriteria criteria); + + /// + /// Finds UIItem which matches specified type. Useful for non managed applications where controls are not identified by AutomationId, like in + /// Managed applications. In case of multiple items of this type the first one found would be returned which cannot be guaranteed to be the same + /// across multiple invocations. + /// + /// IUIItem type e.g. Button, TextBox + /// First item of supplied type + /// when item not found + /// when any errors occured during search + T Get() where T : IUIItem; + + /// + /// Finds UIItem which matches specified type and identification. + /// In case of multiple items of this type the first one found would be returned which cannot be guaranteed to be the same across multiple + /// invocations. For managed applications this is name given to controls in the application code. + /// For unmanaged applications this is text of the control or label next to it if it doesn't have well defined text. + /// + /// + /// IUIItem implementation + /// For managed application this is the name provided in application code and unmanaged application this is + /// the text or label next to it based identification + /// First item of supplied type and identification + /// when item not found + /// when any errors occured during search + T Get(string primaryIdentification) where T : IUIItem; + + /// + /// Finds UIItem which matches specified type and searchCriteria. Type supplied need not be supplied again in SearchCondition. + /// + /// + /// + /// + /// + /// Criteria provided to search UIItem + /// First items matching the type and criteria + /// when item not found + /// when any errors occured during search + T Get(SearchCriteria searchCriteria) where T : IUIItem; + + /// + /// Finds UIItem which matches specified type and searchCriteria using the default BusyTimeout. Look at documentation of SearchCriteria for details on it. + /// + /// Criteria provided to search IUIItem + /// First items matching the criteria + /// when item not found + /// when any errors occured during search + IUIItem Get(SearchCriteria searchCriteria); } } \ No newline at end of file diff --git a/src/TestStack.White/UIItems/ListViewCells.cs b/src/TestStack.White/UIItems/ListViewCells.cs index 8de7fc14..3c81ef4b 100644 --- a/src/TestStack.White/UIItems/ListViewCells.cs +++ b/src/TestStack.White/UIItems/ListViewCells.cs @@ -16,6 +16,7 @@ public ListViewCells(List collection, ActionListener actionLi this.header = header; } + /// when header row is not defined public virtual ListViewCell this[string columnName] { get diff --git a/src/TestStack.White/UIItems/SelectionItem.cs b/src/TestStack.White/UIItems/SelectionItem.cs index a01c616a..5c32e71d 100644 --- a/src/TestStack.White/UIItems/SelectionItem.cs +++ b/src/TestStack.White/UIItems/SelectionItem.cs @@ -19,6 +19,7 @@ public virtual bool IsSelected } } + /// public virtual void Select() { if (!Bounds.IsEmpty) Click(); diff --git a/src/TestStack.White/UIItems/TextBox.cs b/src/TestStack.White/UIItems/TextBox.cs index 9335a371..ffcc12d4 100644 --- a/src/TestStack.White/UIItems/TextBox.cs +++ b/src/TestStack.White/UIItems/TextBox.cs @@ -14,7 +14,8 @@ public TextBox(AutomationElement automationElement, ActionListener actionListene /// /// Enters the text in the textbox. The text would be cleared first. This is not as good performing as the BulkText method. - /// This does raise all keyboard events. + /// This does raise all keyboard events - that means that your string will consist of letters that match the letters + /// of your string but in current input language. /// public virtual string Text { @@ -34,6 +35,7 @@ public virtual string Text /// /// Sets the text in the textbox. The text would be cleared first. This is a better performing than the Text method. This doesn't raise all keyboard events. + /// The string will be set exactly as it is in your code. /// public virtual string BulkText { diff --git a/src/TestStack.White/UIItems/UIItemContainer.cs b/src/TestStack.White/UIItems/UIItemContainer.cs index 1581ff58..11239d8e 100644 --- a/src/TestStack.White/UIItems/UIItemContainer.cs +++ b/src/TestStack.White/UIItems/UIItemContainer.cs @@ -45,53 +45,21 @@ public UIItemContainer(AutomationElement automationElement, ActionListener actio { } - /// - /// Finds UIItem which matches specified type. Useful for non managed applications where controls are not identified by AutomationId, like in - /// Managed applications. In case of multiple items of this type the first one found would be returned which cannot be guaranteed to be the same - /// across multiple invocations. - /// - /// UIItem type e.g. Button, TextBox - /// First item of supplied type - public virtual T Get() where T : UIItem + public virtual T Get() where T : IUIItem { return Get(SearchCriteria.All); } - /// - /// Finds UIItem which matches specified type and identification. - /// In case of multiple items of this type the first one found would be returned which cannot be guaranteed to be the same across multiple - /// invocations. For managed applications this is name given to controls in the application code. - /// For unmanaged applications this is text of the control or label next to it if it doesn't have well defined text. - /// e.g. TextBox doesn't have any predefined text of its own as it can be changed at runtime by user, hence is identified by the label next to it. - /// If there is no label then Get or Get(SearchCriteria) method can be used. - /// - /// UIItem type - /// For managed application this is the name provided in application code and unmanaged application this is - /// the text or label next to it based identification - /// First item of supplied type and identification - public virtual T Get(string primaryIdentification) where T : UIItem + public virtual T Get(string primaryIdentification) where T : IUIItem { return Get(SearchCriteria.ByAutomationId(primaryIdentification)); } - /// - /// Finds UIItem which matches specified type and searchCriteria. Type supplied need not be supplied again in SearchCondition. - /// e.g. in Get - /// - /// Criteria provided to search UIItem - /// First items matching the type and criteria - public virtual T Get(SearchCriteria searchCriteria) where T : UIItem + public virtual T Get(SearchCriteria searchCriteria) where T : IUIItem { return (T) Get(searchCriteria.AndControlType(typeof (T), Framework)); } - /// - /// Finds UIItem which matches specified type and searchCriteria using the default BusyTimeout. Look at documentation of SearchCriteria for details on it. - /// - /// Criteria provided to search UIItem - /// First items matching the criteria public virtual IUIItem Get(SearchCriteria searchCriteria) { return Get(searchCriteria, CoreAppXmlConfiguration.Instance.BusyTimeout()); @@ -100,9 +68,11 @@ public virtual IUIItem Get(SearchCriteria searchCriteria) /// /// Finds UIItem which matches specified type and searchCriteria. Look at documentation of SearchCriteria for details on it. /// - /// Criteria provided to search UIItem + /// Criteria provided to search IUIItem /// Time to wait for item to come on-screen before returning off-screen element, if found. /// First items matching the criteria + /// when item not found + /// when any errors occured during search public virtual IUIItem Get(SearchCriteria searchCriteria, TimeSpan timeout) { try diff --git a/src/TestStack.White/UIItems/WindowItems/Window.cs b/src/TestStack.White/UIItems/WindowItems/Window.cs index 42a846cd..a31ec6a0 100644 --- a/src/TestStack.White/UIItems/WindowItems/Window.cs +++ b/src/TestStack.White/UIItems/WindowItems/Window.cs @@ -93,6 +93,10 @@ private WindowPattern WinPattern get { return (WindowPattern)Pattern(WindowPattern.Pattern); } } + /// + /// Returns true if window available and is on screen. Otherwise + /// or if there were errors it returns false. + /// public virtual bool IsClosed { get @@ -211,6 +215,8 @@ protected static void HourGlassWait() } } + /// + /// when window is not responding private void WaitForWindow() { var windowPattern = (WindowPattern)Pattern(WindowPattern.Pattern); @@ -237,6 +243,7 @@ private bool IsConsole() return ("ConsoleWindowClass".Equals(automationElement.Current.ClassName)); } + /// when current process is not available any more (id expired) protected virtual void WaitForProcess() { Process.GetProcessById(automationElement.Current.ProcessId).WaitForInputIdle(); @@ -290,11 +297,16 @@ public override void Visit(WindowControlVisitor windowControlVisitor) CurrentContainerItemFactory.Visit(windowControlVisitor); } + /// + /// Execute WaitTill with the default timeout from CoreConfiguration (BusyTimeout) + /// + /// when methods reached the timeout public virtual void WaitTill(WaitTillDelegate waitTillDelegate) { WaitTill(waitTillDelegate, CoreAppXmlConfiguration.Instance.BusyTimeout()); } + /// when methods reached the timeout public virtual void WaitTill(WaitTillDelegate waitTillDelegate, TimeSpan timeout) { if (!Retry.For(() => waitTillDelegate(), timeout, new TimeSpan?())) @@ -412,6 +424,7 @@ public override VerticalSpan VerticalSpan /// Recursively gets all the descendant windows. /// /// + /// if your framework is not supported // from ChildWindowFactory.Create public virtual List ModalWindows() { var finder = new AutomationElementFinder(automationElement); From a3d225afe9c463ccdd0fa98a8b6ee7ba4e15f8a9 Mon Sep 17 00:00:00 2001 From: Ritro Date: Sun, 17 Mar 2013 16:15:33 +0400 Subject: [PATCH 2/3] ADD: one more comment --- src/TestStack.White/UIItems/DateFormat.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/TestStack.White/UIItems/DateFormat.cs b/src/TestStack.White/UIItems/DateFormat.cs index 69716b55..2a5f2cbe 100644 --- a/src/TestStack.White/UIItems/DateFormat.cs +++ b/src/TestStack.White/UIItems/DateFormat.cs @@ -49,6 +49,9 @@ public static DateFormat Create(string dateSeparator, string pattern) return dateFormat; } + /// + /// Use ',' as separator. + /// public static DateFormat Parse(string @string) { string[] parts = @string.Split(','); From 885a996febf39b647dd9462b71046f153ea4325c Mon Sep 17 00:00:00 2001 From: Jake Ginnivan Date: Mon, 29 Jul 2013 11:23:43 +0100 Subject: [PATCH 3/3] Some cleanup of this PR --- .../UIItems/DateFormatTest.cs | 4 +- src/TestStack.White/Application.cs | 44 ++++++++----------- .../Factory/ChildWindowFactory.cs | 2 +- src/TestStack.White/Factory/WindowFactory.cs | 12 ++--- src/TestStack.White/UIItems/DateFormat.cs | 14 +++--- src/TestStack.White/UIItems/IUIItem.cs | 9 ---- .../UIItems/WindowItems/Window.cs | 2 +- 7 files changed, 35 insertions(+), 52 deletions(-) diff --git a/src/TestStack.White.UnitTests/UIItems/DateFormatTest.cs b/src/TestStack.White.UnitTests/UIItems/DateFormatTest.cs index b440614b..bb6850f7 100644 --- a/src/TestStack.White.UnitTests/UIItems/DateFormatTest.cs +++ b/src/TestStack.White.UnitTests/UIItems/DateFormatTest.cs @@ -8,8 +8,8 @@ public class DateFormatTest [Fact] public void DifferentDateFormats() { - Assert.Equal(DateFormat.dayMonthYear, DateFormat.Create("-", "dd-MM-yyyy")); - Assert.Equal(DateFormat.dayMonthYear, DateFormat.Create("-", "d-M-yyyy")); + Assert.Equal(DateFormat.DayMonthYear, DateFormat.Create("-", "dd-MM-yyyy")); + Assert.Equal(DateFormat.DayMonthYear, DateFormat.Create("-", "d-M-yyyy")); } } } \ No newline at end of file diff --git a/src/TestStack.White/Application.cs b/src/TestStack.White/Application.cs index f4db8cc3..1969acb4 100644 --- a/src/TestStack.White/Application.cs +++ b/src/TestStack.White/Application.cs @@ -38,10 +38,9 @@ private Application(Process process) /// /// Runs the process identified by the executable and creates Application object for this executable /// - /// location of the executable - /// - /// - /// when some error occured + /// Path to the executable + /// No process info passed + /// White Failed to Launch or Attached to process public static Application Launch(string executable) { var processStartInfo = new ProcessStartInfo(executable); @@ -51,10 +50,8 @@ public static Application Launch(string executable) /// /// Lauches the process and creates and Application object for it /// - /// - /// - /// - /// when some error occured + /// No process info passed + /// White Failed to Launch or Attached to process public static Application Launch(ProcessStartInfo processStartInfo) { if (string.IsNullOrEmpty(processStartInfo.WorkingDirectory)) processStartInfo.WorkingDirectory = "."; @@ -93,19 +90,17 @@ public static Application Launch(ProcessStartInfo processStartInfo) } /// - /// Creates an Application object for existing process + /// Attaches White to an existing process by process id /// - /// - /// - /// when process not found + /// White Failed to Attach to process public static Application Attach(int processId) { - Process process = null; + Process process; try { process = Process.GetProcessById(processId); } - catch (System.ArgumentException e) + catch (ArgumentException e) { throw new WhiteException("Could not find process with id: " + processId, e); } @@ -113,10 +108,9 @@ public static Application Attach(int processId) } /// - /// Attaches with existing process + /// Attaches White to an existing process /// - /// - /// + /// White Failed to Attach to process public static Application Attach(Process process) { return new Application(process); @@ -125,9 +119,7 @@ public static Application Attach(Process process) /// /// Attaches with existing process /// - /// - /// - /// when process is not found + /// White Failed to Attach to process with specified name public static Application Attach(string executable) { Process[] processes = Process.GetProcessesByName(executable); @@ -142,7 +134,7 @@ public static Application Attach(string executable) /// /// /// - /// when some error occured + /// White Failed to Launch or Attach to process public static Application AttachOrLaunch(ProcessStartInfo processStartInfo) { string processName = ReplaceLast(processStartInfo.FileName, ".exe", string.Empty); @@ -181,7 +173,7 @@ public virtual ApplicationSession ApplicationSession /// Title text of window displayed on desktop /// Option which would be used to initialize the window. /// - /// if your framework is not supported + /// The application type is not supported by White public virtual Window GetWindow(string title, InitializeOption option) { WindowSession windowSession = applicationSession.WindowSession(option); @@ -193,7 +185,7 @@ public virtual Window GetWindow(string title, InitializeOption option) /// /// Title text of window displayed on desktop /// - /// if your framework is not supported + /// The application type is not supported by White public virtual Window GetWindow(string title) { return GetWindow(title, InitializeOption.NoCache); @@ -205,7 +197,7 @@ public virtual Window GetWindow(string title) /// /// found window would be initialized with this option /// - /// if your framework is not supported + /// The application type is not supported by White public virtual Window GetWindow(SearchCriteria searchCriteria, InitializeOption initializeOption) { WindowSession windowSession = applicationSession.WindowSession(initializeOption); @@ -253,7 +245,7 @@ public virtual void Kill() /// All windows belonging to the application /// /// - /// if your framework is not supported + /// The application type is not supported by White public virtual List GetWindows() { return windowFactory.DesktopWindows(process, new NoApplicationSession()); @@ -309,7 +301,7 @@ public virtual void WaitWhileBusy() /// /// /// option for the window which matches the condition - /// if your framework is not supported + /// The application type is not supported by White public virtual Window Find(Predicate match, InitializeOption initializeOption) { WindowSession windowSession = applicationSession.WindowSession(initializeOption); diff --git a/src/TestStack.White/Factory/ChildWindowFactory.cs b/src/TestStack.White/Factory/ChildWindowFactory.cs index c9ff3f8b..33c08a9c 100644 --- a/src/TestStack.White/Factory/ChildWindowFactory.cs +++ b/src/TestStack.White/Factory/ChildWindowFactory.cs @@ -44,7 +44,7 @@ protected virtual AutomationElement WaitTillFound(Func find, return element; } - /// if your framework is not supported + /// The application type is not supported by White internal static Window Create(AutomationElement element, InitializeOption option, WindowSession windowSession) { SpecializedWindowFactory specializedWindowFactory = SpecializedWindowFactories.Find(factory => factory.DoesSpecializeInThis(element)); diff --git a/src/TestStack.White/Factory/WindowFactory.cs b/src/TestStack.White/Factory/WindowFactory.cs index 9ce64562..ef891924 100644 --- a/src/TestStack.White/Factory/WindowFactory.cs +++ b/src/TestStack.White/Factory/WindowFactory.cs @@ -68,7 +68,7 @@ public virtual Window SplashWindow(Process process) return new SplashWindow(element, InitializeOption.NoCache); } - /// if your framework is not supported + /// The application type is not supported by White public virtual Window CreateWindow(string title, Process process, InitializeOption option, WindowSession windowSession) { var message = string.Format("Couldn't find window with title {0} in process {1}{2}", title, process.Id, ", after waiting for 30 seconds"); @@ -76,7 +76,7 @@ public virtual Window CreateWindow(string title, Process process, InitializeOpti return Create(element, option, windowSession); } - /// if your framework is not supported + /// The application type is not supported by White public virtual Window CreateWindow(SearchCriteria searchCriteria, Process process, InitializeOption option, WindowSession windowSession) { var message = string.Format("Couldn't find window with SearchCriteria {0} in process {1}{2}", searchCriteria, process.Id, Constants.BusyMessage); @@ -84,7 +84,7 @@ public virtual Window CreateWindow(SearchCriteria searchCriteria, Process proces return Create(element, option, windowSession); } - /// if your framework is not supported + /// The application type is not supported by White public virtual Window FindWindow(Process process, Predicate match, InitializeOption initializeOption, WindowSession windowSession) { string message = string.Format("Could not find window matching condition. ProcessName: {0}, ProcessId: {1}, MatchingConditionMethod: {2}, MatchingConditionTarget: {3}", process.ProcessName, process.Id, match.Method, match.Target); @@ -92,7 +92,7 @@ public virtual Window FindWindow(Process process, Predicate match, Initi return Create(foundElement, initializeOption, windowSession); } - /// if your framework is not supported + /// The application type is not supported by White public virtual Window FindModalWindow(string title, Process process, InitializeOption option, AutomationElement parentWindowElement, WindowSession windowSession) { @@ -102,7 +102,7 @@ public virtual Window FindModalWindow(string title, Process process, InitializeO return Create(modalWindowElement, option, windowSession); } - /// if your framework is not supported + /// The application type is not supported by White public virtual Window FindModalWindow(SearchCriteria searchCriteria, InitializeOption option, AutomationElement parentWindowElement, WindowSession windowSession) { var windowFinder = new AutomationElementFinder(parentWindowElement); @@ -137,7 +137,7 @@ private AutomationElement FindWindowElement(Process process, Predicate m }); } - /// if your framework is not supported + /// The application type is not supported by White public virtual List DesktopWindows() { var windows = new List(); diff --git a/src/TestStack.White/UIItems/DateFormat.cs b/src/TestStack.White/UIItems/DateFormat.cs index 2a5f2cbe..8cb969be 100644 --- a/src/TestStack.White/UIItems/DateFormat.cs +++ b/src/TestStack.White/UIItems/DateFormat.cs @@ -10,12 +10,12 @@ namespace TestStack.White.UIItems /// public class DateFormat { - public static DateFormat dayMonthYear = new DateFormat(DateUnit.Day, DateUnit.Month, DateUnit.Year); - public static DateFormat dayYearMonth = new DateFormat(DateUnit.Day, DateUnit.Year, DateUnit.Month); - public static DateFormat monthDayYear = new DateFormat(DateUnit.Month, DateUnit.Day, DateUnit.Year); - public static DateFormat monthYearDay = new DateFormat(DateUnit.Month, DateUnit.Year, DateUnit.Day); - public static DateFormat yearMonthDay = new DateFormat(DateUnit.Year, DateUnit.Month, DateUnit.Day); - public static DateFormat yearDayMonth = new DateFormat(DateUnit.Year, DateUnit.Day, DateUnit.Month); + public static DateFormat DayMonthYear = new DateFormat(DateUnit.Day, DateUnit.Month, DateUnit.Year); + public static DateFormat DayYearMonth = new DateFormat(DateUnit.Day, DateUnit.Year, DateUnit.Month); + public static DateFormat MonthDayYear = new DateFormat(DateUnit.Month, DateUnit.Day, DateUnit.Year); + public static DateFormat MonthYearDay = new DateFormat(DateUnit.Month, DateUnit.Year, DateUnit.Day); + public static DateFormat YearMonthDay = new DateFormat(DateUnit.Year, DateUnit.Month, DateUnit.Day); + public static DateFormat YearDayMonth = new DateFormat(DateUnit.Year, DateUnit.Day, DateUnit.Month); private readonly List dateUnits = new List(); @@ -49,7 +49,7 @@ public static DateFormat Create(string dateSeparator, string pattern) return dateFormat; } - /// + /// /// Use ',' as separator. /// public static DateFormat Parse(string @string) diff --git a/src/TestStack.White/UIItems/IUIItem.cs b/src/TestStack.White/UIItems/IUIItem.cs index 187520ce..73b3edee 100644 --- a/src/TestStack.White/UIItems/IUIItem.cs +++ b/src/TestStack.White/UIItems/IUIItem.cs @@ -95,13 +95,4 @@ public interface IUIItem : ActionListener void Enter(string value); } - - /// - /// Class which inherits this interface has a mapping to it's Automation type. - /// Used for search constraints. - /// - public interface IMappableUIItem - { - - } } \ No newline at end of file diff --git a/src/TestStack.White/UIItems/WindowItems/Window.cs b/src/TestStack.White/UIItems/WindowItems/Window.cs index a31ec6a0..b546fc59 100644 --- a/src/TestStack.White/UIItems/WindowItems/Window.cs +++ b/src/TestStack.White/UIItems/WindowItems/Window.cs @@ -424,7 +424,7 @@ public override VerticalSpan VerticalSpan /// Recursively gets all the descendant windows. /// /// - /// if your framework is not supported // from ChildWindowFactory.Create + /// The application type is not supported by White // from ChildWindowFactory.Create public virtual List ModalWindows() { var finder = new AutomationElementFinder(automationElement);