How to use Selenium WebDriver on local webpage (on my PC) instead of one located somewhere online?
Try using this method:
webdriver.get("file:///D:/folder/abcd.html");
(or)
selenium = new WebDriverBackedSelenium(driver, "file:///D:/folder/abcd.html");
This can also be done with a relative file:
Path sampleFile = Paths.get("sample.html");
driver.get(sampleFile.toUri().toString());