0

How do i load a html file in webdriver from the src/test/resources folder, like

driver.get("file///src//resources//test//login.html") This is giving me invalid argument error.. I want the code to run in any system without any dependency on folder structure.

SachuDev
  • 21
  • 2
  • 3
    Does this answer your question? [How to use Selenium WebDriver on local webpage (on my PC) instead of one located somewhere online?](https://stackoverflow.com/questions/17972885/how-to-use-selenium-webdriver-on-local-webpage-on-my-pc-instead-of-one-located) – olli_kahn Sep 03 '20 at 21:52

1 Answers1

0

driver.get() method expect http or https protocol to be inject on the browser. when you try with file path it wont work.

What exactly you want to achieve/ Can you please elaborate?

QA Square
  • 245
  • 1
  • 3