0

If you are using Selenium in Java and have a string of HTML and JavaScript Source are you able to have a real browser render the source with the webdriver?

halfer
  • 19,824
  • 17
  • 99
  • 186
ControlAltDelete
  • 3,576
  • 5
  • 32
  • 50

1 Answers1

0

Yes you can open the HTML file in a browser. You have to specify the "file:///" protocol in get() method to open the file in browser. You can refer below code.

webdriver.get("file:///<filePath>/fileName.html");

Do let us know if that helps you out.

Abhinav
  • 1,037
  • 6
  • 20
  • 43