Skip to content

Commit c73bfdd

Browse files
authored
Merge pull request #4372 from Ginger-Automation/BugFix/JavaExplorerFix
Bug fix/java explorer fix
2 parents 5ce2759 + 02f7c24 commit c73bfdd

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Ginger/GingerCore/Drivers/JavaDriverLib/JavaDriver.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,7 +2081,7 @@ private void GetWidgetsElementList(ObservableList<UIElementFilter> selectedEleme
20812081
{
20822082
break;
20832083
}
2084-
if(selectedElementTypesList != null && selectedElementTypesList.Any(x=>x.ElementType.Equals(htmlElement.ElementTypeEnum)))
2084+
if (selectedElementTypesList != null && selectedElementTypesList.Any(x => x.ElementType.Equals(htmlElement.ElementTypeEnum)))
20852085
{
20862086
htmlElement.IsAutoLearned = true;
20872087
htmlElement.Active = true;
@@ -2179,7 +2179,7 @@ async Task<List<ElementInfo>> IWindowExplorer.GetVisibleControls(PomSetting pomS
21792179
if (pomSetting.FilteredElementType != null)
21802180
{
21812181
//if (!pomSetting.FilteredElementType.Contains(ci.ElementTypeEnum))
2182-
if(!pomSetting.FilteredElementType.Any(x => x.ElementType.Equals(ci.ElementTypeEnum)))
2182+
if (!pomSetting.FilteredElementType.Any(x => x.ElementType.Equals(ci.ElementTypeEnum)))
21832183
{
21842184
learnElement = false;
21852185
}
@@ -2464,7 +2464,7 @@ void IWindowExplorer.HighLightElement(ElementInfo ElementInfo, bool locateElemen
24642464
}
24652465

24662466
HTMLElementInfo HEI = (HTMLElementInfo)ElementInfo;
2467-
if (ElementInfo.ElementType.Contains("JEditor"))
2467+
if (ElementInfo.ElementType != null && ElementInfo.ElementType.Contains("JEditor"))
24682468
{
24692469
PayLoad Request = new PayLoad("HighLightEditorElement");
24702470
Request.AddValue(HEI.Path);
@@ -2489,7 +2489,7 @@ ObservableList<ControlProperty> IWindowExplorer.GetElementProperties(ElementInfo
24892489
ObservableList<ControlProperty> list = [];
24902490

24912491
PayLoad response = null;
2492-
if (ElementInfo.ElementType.Contains("JEditor"))
2492+
if (ElementInfo.ElementType != null && ElementInfo.ElementType.Contains("JEditor"))
24932493
{
24942494
PayLoad PLReq = new PayLoad("GetEditorElementProperties");
24952495
PLReq.AddValue("ByCSSSelector");
@@ -2753,7 +2753,7 @@ ObservableList<ElementLocator> IWindowExplorer.GetElementLocators(ElementInfo El
27532753
}
27542754
}
27552755

2756-
if (ElementInfo.ElementType.Contains("JEditor"))
2756+
if (ElementInfo.ElementType != null && ElementInfo.ElementType.Contains("JEditor"))
27572757
{
27582758
if (!String.IsNullOrEmpty(ElementInfo.Path))
27592759
{

0 commit comments

Comments
 (0)