Highlight elements in WebDriver during runtime

后端 未结 10 1213
离开以前
离开以前 2020-12-02 15:54

Can someone please help!

How can I highlight all web elements in following class during test execution in WebDriver? With Selenium RC, it was quite straight forward

10条回答
  •  无人及你
    2020-12-02 16:41

    For highlighting the element you can just use this:

    JavascriptExecutor js =(JavascriptExecutor)driver;
    js.executeScript("arguments[0].style.border='5px dotted yellow'", element);
    

提交回复
热议问题