How to navigate to my local html file using Selenium Webdriver

3,338 views
Skip to first unread message

Budh Ram

unread,
Aug 24, 2015, 1:02:00 PM8/24/15
to Selenium Users
Hi Folks,

I am building a automated test where I need to open a browser and then open a html file "views/index.html".

Any idea how to achieve it?

Kaleem Uddin Mohammed Abdul

unread,
Aug 25, 2015, 12:45:37 AM8/25/15
to Selenium Users
Use Java.io if you are using Java. If you are using C# using System.IO.

Jon Thor Austen

unread,
Aug 25, 2015, 8:31:33 PM8/25/15
to Selenium Users
Seems like something like this should work:

webdriver.get("file:///D:/folder/abcd.html");
Reply all
Reply to author
Forward
0 new messages