2

I need to read email from DB and save that email as .html on my desktop and then open that html and go through docusign process to complete the process.

I have code written for reading from DB and saving the output file as .html in my documents.

Now, I want to open that file in a new webdriver session and continue with rest of my testing. How can I achieve that?

We are using Selenium Python. Please advise

user2744620
  • 439
  • 1
  • 9
  • 21
  • 3
    Are you asking about opening a local html file with webdriver? If yes, this is related: http://stackoverflow.com/questions/17972885/how-to-use-selenium-webdriver-on-local-on-my-pc-webpage-instead-of-locate-somw. – alecxe May 06 '15 at 22:55
  • Thank you man! It worked... I also have a question on copy and paste code. Do i need to open a new thread or Can i post it here? – user2744620 May 07 '15 at 04:40
  • I think the right move would be to close this thread as a duplicate. Or, if you don't agree this is a duplicate - consider providing your own solution as an answer and accept it. Thanks. – alecxe May 07 '15 at 09:37

1 Answers1

3

Try using:

webdriver.get("file:///D:/folder/abcd.html");

(or)

selenium = new WebDriverBackedSelenium(driver, "file:///D:/folder/abcd.html");
dnlcrl
  • 5,022
  • 3
  • 32
  • 40