From 73edd221ebe6c221f93802ce52164fb4f83b944c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20G=C3=B3mez?= Date: Tue, 7 Mar 2017 15:19:53 -0800 Subject: [PATCH] If TableCells cannot be found as descendants of the Table then look for cells as descendats of the Row --- src/TestStack.White/Factory/TableCellFactory.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/TestStack.White/Factory/TableCellFactory.cs b/src/TestStack.White/Factory/TableCellFactory.cs index 67df882d..371997ae 100644 --- a/src/TestStack.White/Factory/TableCellFactory.cs +++ b/src/TestStack.White/Factory/TableCellFactory.cs @@ -31,6 +31,8 @@ public virtual TableCells CreateCells(TableHeader tableHeader, AutomationElement return name.EndsWith(rowNameSuffix); }; List tableCellElements = customControlTypes.FindAll(cellPredicate); + if (tableCellElements.Count > 0) return new TableCells(tableCellElements, tableHeader, actionListener); + tableCellElements = new AutomationElementFinder(rowElement).Descendants(AutomationSearchCondition.ByControlType(ControlType.DataItem)); return new TableCells(tableCellElements, tableHeader, actionListener); } }