Highlight elements in WebDriver during runtime

后端 未结 10 1199
离开以前
离开以前 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:23

    I am unaware of any way to do this in WebDriver, but it looks like there exists a class in Selenium WebDriver that should give you access to most if not all of the RC API. I'm not aware of how to actually do this using WebDriver.

    The class WebDriverBackedSelenium looks like it contains much of the RC api you're used to including getEval

    To create an object of type WebDriverBackedSelenium, just pass in the driver you've already been using in addition to your testing site's base URL

    WebDriverBackedSelenium wdbs = new WebDriverBackedSelenium(driver, "http://www.google.com");
    

提交回复
热议问题