Skip to content

Commit 5925e71

Browse files
committed
Comments fixes
1 parent 8abe802 commit 5925e71

File tree

1 file changed

+3
-16
lines changed
  • Behavioral.Automation.Template/Behavioral.Automation.Template.Bindings/ElementWrappers

1 file changed

+3
-16
lines changed

Behavioral.Automation.Template/Behavioral.Automation.Template.Bindings/ElementWrappers/WebElementWrapper.cs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,16 @@ public bool Displayed
8585
{
8686
try
8787
{
88-
return !(Element is null) && Element.Displayed;
88+
return Element is not null && Element.Displayed;
8989
}
90-
catch (Exception e) when (e is NullReferenceException || e is StaleElementReferenceException)
90+
catch (Exception e) when (e is NullReferenceException or StaleElementReferenceException)
9191
{
9292
return false;
9393
}
9494
}
9595
}
9696

97-
public bool Enabled => Displayed && (Element.Enabled || AriaEnabled);
97+
public bool Enabled => Displayed && Element.Enabled;
9898

9999
public string Tooltip => GetAttribute("data-test-tooltip-text");
100100

@@ -134,18 +134,5 @@ private IEnumerable<IWebElementWrapper> ElementsToWrappers(IEnumerable<IWebEleme
134134
}
135135

136136
protected IDriverService Driver { get; }
137-
138-
private bool AriaEnabled
139-
{
140-
get
141-
{
142-
return Element.GetAttribute("aria-disabled") switch
143-
{
144-
null => true,
145-
"false" => true,
146-
_ => false
147-
};
148-
}
149-
}
150137
}
151138
}

0 commit comments

Comments
 (0)