Inheritance: GridPattern
Beispiel #1
0
		/// -------------------------------------------------------------------
		/// <summary>
        /// Get the tablepattern on the element
        /// </summary>
		/// -------------------------------------------------------------------
		public TableTests(AutomationElement element, TestPriorities priority, string dirResults, bool testEvents, TypeOfControl typeOfControl, IApplicationCommands commands)
            :
            base(element, TestSuite, priority, typeOfControl, TypeOfPattern.Table, dirResults, testEvents, commands)
        {
            m_pattern = (TablePattern)GetPattern(m_le, m_useCurrent, TablePattern.Pattern);
            if (m_pattern == null)
                throw new Exception(Helpers.PatternNotSupported);
        }        
Beispiel #2
0
        public GuiDataGrid(AutomationElement datagrid, string automationId)
        {
            dgAutoEl = datagrid;
            tablePatt = datagrid.GetPattern<TablePattern>(TablePattern.Pattern);

            AutomationId = automationId;

            HeaderNamesToIndex = new Dictionary<string, int>();
            HeaderIndexToNames = new Dictionary<int, string>();
            BuildHeaderDictCache();
        }
Beispiel #3
0
 internal new static object Wrap(AutomationElement el, object pattern, bool cached)
 {
     TablePattern result = null;
     if (pattern != null)
     {
         UIAutomationClient.IUIAutomationGridPattern gridPattern =
             (UIAutomationClient.IUIAutomationGridPattern)el.GetRawPattern(GridPattern.Pattern, cached);
         if (gridPattern != null)
         {
             result = new TablePattern(el, (UIAutomationClient.IUIAutomationTablePattern)pattern,
                 gridPattern, cached);
         }
     }
     return result;
 }
Beispiel #4
0
        internal new static object Wrap(AutomationElement el, object pattern, bool cached)
        {
            TablePattern result = null;

            if (pattern != null)
            {
                UIAutomationClient.IUIAutomationGridPattern gridPattern =
                    (UIAutomationClient.IUIAutomationGridPattern)el.GetRawPattern(GridPattern.Pattern, cached);
                if (gridPattern != null)
                {
                    result = new TablePattern(el, (UIAutomationClient.IUIAutomationTablePattern)pattern,
                                              gridPattern, cached);
                }
            }
            return(result);
        }
Beispiel #5
0
 internal TablePatternInformation(TablePattern pattern, bool cache)
 {
     this.pattern = pattern;
     this.cache   = cache;
 }
Beispiel #6
0
			internal TablePatternInformation (TablePattern pattern, bool cache)
			{
				this.pattern = pattern;
				this.cache = cache;
			}
Beispiel #7
0
		protected override void CustomFixtureSetUp ()
		{
			base.CustomFixtureSetUp ();
			gridPattern = (GridPattern) table1Element.GetCurrentPattern (GridPattern.Pattern);
			tablePattern = (TablePattern) table1Element.GetCurrentPattern (TablePattern.Pattern);
		}