How to use Selenium WebDriver on local webpage (on my PC) instead of one located somewhere online?

前端 未结 6 2009
小鲜肉
小鲜肉 2020-11-27 18:58

I want to use Selenium WebDriver on a webpage that I have on my hard disc. I\'ve tried to something like:

selenium =         


        
6条回答
  •  南笙
    南笙 (楼主)
    2020-11-27 19:42

    You can always drag and drop html file from your PC on open web browser during selenium session and see how file path looks. In my case it is:

    webdriver.get("file:///C:/Users/Desktop/Some%20%E2%80%93%20file%20on%20the%20PC.html")
    

提交回复
热议问题