internal TextWrapper(AutomationElement element, string testSuite, TestPriorities priority, TypeOfControl typeOfControl, TypeOfPattern typeOfPattern, string dirResults, bool testEvents, IApplicationCommands commands) : base(element, testSuite, priority, typeOfControl, typeOfPattern, dirResults, testEvents, commands) { if (m_le == null) throw new ArgumentException("m_le cannot be null"); _pattern = (TextPattern)m_le.GetCurrentPattern(TextPattern.Pattern); _frameworkId = ((string)m_le.GetCurrentPropertyValue(AutomationElement.FrameworkIdProperty)).ToLower(CultureInfo.InvariantCulture); _testPriority = TestPriorities.BuildVerificationTest; // default value // Determine if tests currently running on Windows Vista NativeMethods.OSVERSIONINFOEX ver = new NativeMethods.OSVERSIONINFOEX(); UnsafeNativeMethods.GetVersionEx(ver); if (ver.majorVersion >= 6) // This should account for Windows Vista + Service Packs _windowsVista = true; // It may also occur for Vienna, but the expectation is things else // could change so much post-Vista, that TextPattern tests will _windowsVista = false; // have to be revisited anyway ((i.e. we will likely be moving to un-managed client) Comment("Operating System Version = " + ver.majorVersion + "." + ver.minorVersion + "." + ver.buildNumber); }
internal static extern bool GetVersionEx([In, Out] NativeMethods.OSVERSIONINFOEX ver);