From 6b4a5bf3b7ae9331aaf877f315ffaef9ad09366c Mon Sep 17 00:00:00 2001 From: Martyn Nevers Date: Mon, 22 Feb 2021 11:40:59 +0000 Subject: [PATCH] Fix for ClickCommand operation on a subgrid (issue 1087) --- Microsoft.Dynamics365.UIAutomation.Api.UCI/WebClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Dynamics365.UIAutomation.Api.UCI/WebClient.cs b/Microsoft.Dynamics365.UIAutomation.Api.UCI/WebClient.cs index 674e5cd7..81505114 100644 --- a/Microsoft.Dynamics365.UIAutomation.Api.UCI/WebClient.cs +++ b/Microsoft.Dynamics365.UIAutomation.Api.UCI/WebClient.cs @@ -1995,7 +1995,7 @@ public BrowserCommandResult ClickSubGridCommand(string subGridName, string // Locate subGrid command list //var foundCommands = subGrid.TryFindElement(By.XPath(AppElements.Xpath[AppReference.Entity.SubGridList].Replace("[NAME]", subgridName)), out subGridRecordList); - var items = subGridCommandBar.FindElements(By.TagName("li")); + var items = subGridCommandBar.FindElements(By.TagName("button")); //Is the button in the ribbon? if (items.Any(x => x.GetAttribute("aria-label").Equals(name, StringComparison.OrdinalIgnoreCase)))