I want to using cookie to authenticate a login page with selenium test. I am using code of the form:
selenium.createCookie("name=Cookie", value);
selenium.open("http://localhost/sample/Login");
but no have result. Cannot login.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You must call
selenium.openfor a URL in the same domain as the cookie (in this case, “http://localhost/sample”). Then you can callselenium.createCookiewith the appropriate arguments.