Created
April 27, 2018 19:48
-
-
Save LenarBad/5451c1a027016d5ab5ee21a12cfd4512 to your computer and use it in GitHub Desktop.
Selenium WebDriver - open a local html file. The file should be placed in the resources folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String path = this.getClass().getResource("/my-local-form-page.html").getPath(); | |
driver.get("file://" + path); | |
driver.findElement(By.id("button")).click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Selenium WebDriver. Open local file