Skip to content

Commit

Permalink
Merge pull request #3917 from Ginger-Automation/BugFix/40481-ByTagNam…
Browse files Browse the repository at this point in the history
…eLocatorShouldBeDisabled

BugFix - 40481 - Disable by tag name locator
  • Loading branch information
Maheshkale447 authored Sep 20, 2024
2 parents b14bbbc + f1755b5 commit e5bc701
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5787,6 +5787,15 @@ ElementInfo IWindowExplorer.LearnElementInfoDetails(ElementInfo EI, PomSetting p
}
EI.Properties = ((IWindowExplorer)this).GetElementProperties(EI);// improve code inside

if (EI.FriendlyLocators.Count == 0 && EI.Locators.Count >= 1)
{
ElementLocator byTagNameLocator = EI.Locators.FirstOrDefault(l => l.LocateBy == eLocateBy.ByTagName);
if (byTagNameLocator != null)
{
byTagNameLocator.Active = false;
}
}

return EI;
}

Expand Down

0 comments on commit e5bc701

Please sign in to comment.