📜  隐藏元素硒 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:08.995000             🧑  作者: Mango

代码示例1
public void hideElement(String xpath)
{
    WebElement element = driver.findElement(By.xpath(xpath));       
    ((JavascriptExecutor)driver).executeScript("arguments[0].style.visibility='hidden'", element);
}