Ensuring IE-9 compatibility while end to end testi

2019-07-15 11:25发布

问题:

I am using PhantomJS (headless end to end testing),selenium webdriver,grunt(task runner) for my application testing. My requirement is that the application should be compatible with IE-9. I have to do headless testing because I'm using jenkins for continuous integration.

How do i make sure that my application will run perfectly on IE-9 while testing on phantomJS ?

回答1:

You can't use PhantomJS for testing compatibility with Internet Explorer, because it is a Webkit browser.

Since you're using Selenium, you should be able to use the IE WebDriver.

Some thoughts on why you can't even simulate IE in PhantomJS:

  • They are built on different base technologies. They use different rendering engines and both have different bugs when it comes to adhering to W3C specifications.
  • JavaScript bugs may be simulatable, but this requires you to go ahead and fix all bugs that PhantomJS has in comparison to your specific IE version by exchanging the implementation of some browser APIs. You would also need to introduce some bugs that are present in your IE version, but not in PhantomJS again by exchanging implementation.
  • CSS bugs can only be introduced if you change the WebKit implementation and compile it again. You would have to find them first.

Great, you have effectively reverse engineered IE.