public static void Test_Login_02() { Http http = Ebookdz.LoadMainPage(); XXElement xeSource = new XXElement(http.zGetXDocument().Root); Trace.WriteLine("Login : \"{0}\"", Ebookdz.GetLogin(xeSource)); bool isLoggedIn = Ebookdz.IsLoggedIn(xeSource); Trace.WriteLine("Is logged in : \"{0}\"", isLoggedIn); if (!isLoggedIn) { http = Ebookdz.Login(xeSource); Ebookdz.SaveCookies(http.RequestParameters.Cookies); http = Ebookdz.LoadMainPage(); xeSource = new XXElement(http.zGetXDocument().Root); Trace.WriteLine("Login : \"{0}\"", Ebookdz.GetLogin(xeSource)); Trace.WriteLine("Is logged in : \"{0}\"", Ebookdz.IsLoggedIn(xeSource)); } }