How do I use the HtmlUnit driver with Selenium through the Python bindings?

后端 未结 4 1216
伪装坚强ぢ
伪装坚强ぢ 2021-02-01 08:41

I\'m using WebDriver through the Python bindings located on Google\'s site. According to the documentation here, it supports four browsers: Chrome, IE, Firefox, and HtmlUnit.

4条回答
  •  失恋的感觉
    2021-02-01 09:06

    // You can use HtmlUnitDriver in this case.

           import org.openqa.selenium.htmlunit.HtmlUnitDriver;
    

    // Declaring and initialising the HtmlUnitWebDriver

        HtmlUnitDriver unitDriver = new HtmlUnitDriver();
    

    // open google.com webpage

        unitDriver.get("http://google.com");
    

提交回复
热议问题