Skip to content

Commit ac66e4b

Browse files
committed
removing commented code
1 parent b567b97 commit ac66e4b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

java/src/org/openqa/selenium/remote/RemoteWebElement.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ public WebDriver getWrappedDriver() {
282282

283283
@Override
284284
public boolean isDisplayed() {
285-
// String script = "return arguments[0].checkVisibility({ visibilityProperty: true, opacityProperty: true });"
285+
// Note: The 'if (style.getPropertyValue())' condition in the below script is
286+
// suspect. It may not cover all cases required.
286287
String script = "const visibility = arguments[0].checkVisibility({ visibilityProperty: true, opacityProperty: true, contentVisibilityAuto: true });\n"
287288
+ "if (visibility) {\n"
288289
+ " const style = getComputedStyle(arguments[0]);\n"
@@ -308,8 +309,6 @@ public boolean isDisplayed() {
308309
+ "}\n"
309310
+ "return visibility;";
310311
Object value = parent.executeScript(script, this);
311-
312-
// Object value = execute(DriverCommand.IS_ELEMENT_DISPLAYED(id)).getValue();
313312
try {
314313
// See https://github.com/SeleniumHQ/selenium/issues/9266
315314
if (value == null) {

0 commit comments

Comments
 (0)