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?
Asked
Active
Viewed 88 times
0
-
try it: http://stackoverflow.com/a/17973306/2517622 – drets Dec 16 '15 at 17:47
1 Answers
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