How to set the browser language of PhantomJS

前端 未结 2 593
名媛妹妹
名媛妹妹 2020-12-21 10:34

I\'m using DalekJS with PhantomJS to test a web application. I have important assertions which depend on the browser language. And these fail if the language is not English.

2条回答
  •  春和景丽
    2020-12-21 11:14

    Let me answer my own question:

    The problem is solved when you use following code in your index.html:

      
    

    So the site will be displayed in english no matter which browser is used.

提交回复
热议问题