-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Closed
Copy link
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-javaJava BindingsJava BindingsD-chromeI-defectSomething is not working as intendedSomething is not working as intendedOS-windows
Description
Description
The isDisplayed atom does return incorrect results for elements with css property content-visibility: hidden
set.
Reproducible Code
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
public class Main111 {
public static void main(String[] args) throws Exception {
ChromeDriver cd = new ChromeDriver();
var page = "<div id='a' style='content-visibility: hidden'>A<div id='b'>B</div></div>";
cd.get("data:text/html;charset=utf-8;base64,"
+ Base64.getEncoder().encodeToString(page.getBytes(StandardCharsets.UTF_8)));
if (cd.findElement(By.id("a")).isDisplayed()) {
throw new IllegalStateException("A");
}
if (cd.findElement(By.id("b")).isDisplayed()) {
throw new IllegalStateException("B");
}
}
}
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-javaJava BindingsJava BindingsD-chromeI-defectSomething is not working as intendedSomething is not working as intendedOS-windows