Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は Selenium を初めて使用します。特定の画面の背景色をアサートしたいと考えています。Selenium rcを使用して背景色をアサートする方法は?
本体から背景色を取得することで取得できます。次のようになります。
WebElement body = driver.findElement(By.cssSelector("body")); String color = body.getAttribute("bgcolor");