在Selenium Java 中是否有WebElement class 的get body 标签方法?
Is there any get body tag method for WebElement class in Selenium Java?
我一直在尝试获取 HTML 源中的页面正文。我一直在尝试 WebElement
Class。我无法访问 invisibilityOfAllElements
方法,或者说它会抛出错误。我写过这样的代码:
WebElement element = waitBody.until(ExpectedConditions.invisibilityOfAllElements(By.tagName("body")));
waitbody
是我定义的 WebDriverWait
Class 的对象。 Eclipse 突出显示 invisibilityOfAllElements
的下划线。有什么办法可以解决这个问题吗?谢谢。
invisibilityOfAllElements() 需要 'List of WebElement' 类型的定位器,但您提供的是 'by'.
改为使用 invisibilityOfElementLocated。
我一直在尝试获取 HTML 源中的页面正文。我一直在尝试 WebElement
Class。我无法访问 invisibilityOfAllElements
方法,或者说它会抛出错误。我写过这样的代码:
WebElement element = waitBody.until(ExpectedConditions.invisibilityOfAllElements(By.tagName("body")));
waitbody
是我定义的 WebDriverWait
Class 的对象。 Eclipse 突出显示 invisibilityOfAllElements
的下划线。有什么办法可以解决这个问题吗?谢谢。
invisibilityOfAllElements() 需要 'List of WebElement' 类型的定位器,但您提供的是 'by'.
改为使用 invisibilityOfElementLocated。