开发者

Testing html files using Selenium and IE

开发者 https://www.devze.com 2023-01-05 10:40 出处:网络
How can I use selenium to open up html files on my machine on a browser besides Firefox? When starting Selenium, the baseUrl is set to either a real website (www.google.com) and the initial open comma

How can I use selenium to open up html files on my machine on a browser besides Firefox? When starting Selenium, the baseUrl is set to either a real website (www.google.com) and the initial open command of the test points to the local html file

selenium.open("file:///C:/to/local/file.html")

or the baseUrl is set directly to the local html file and 开发者_开发百科the initial line in the test is

selenium.open("/")

Is there a way to run these tests with the browser set to *iexplore that will not crash selenium?


Selenium tests all start as http requests to talk to the Selenium Proxy server. Internet Explorer won't allow Selenium to use Javascript from http when it opens a page using file:///

http://seleniumhq.org/docs/05_selenium_rc.html#the-same-origin-policy

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号