开发者

Not able to open the web page while runing test from Selenium

When i run my scripts as Junit test case, the browser opens up and also tries to o开发者_StackOverflow中文版pen the provided URL. But, only the header and footer of the website is opened with the message "Cookies and Javascript Required

In order to correctly view this website, you will need Cookies and Javascript enabled on your browser. To set your browser to support these requirements, please visit your browser's help menu for the appropriate instructions."

This makes the entire script to fail as the Web elements are not displayed.


You need to provide some more information:

Does this behavior happen when you access the site normally i.e. without Selenium RC involved?

Which browser are you using?

Have you tried another browser? You can do that by changing the parameters in this line:

seleniumId = new DefaultSelenium( "localhost", 4444, "*iexplore", "http://URL");

(A useful trick is to put garbage in the browser parameter and when you run it, the error message shows all the allowable browser strings.)

Have you tried to enable cookies and Javascript? What happens then?

If you don't want cookies and Javascript enabled normally and you are using FireFox, you can set Selenium RC up to use a special proxy that does allow this (but only for Selenium tests). See here

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜