PageRenderTime 22ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/BlogEngine/BlogEngine.Tests/PageTemplates/Account/Login.cs

#
C# | 37 lines | 31 code | 6 blank | 0 comment | 0 complexity | 63f915c81c997da290fd5ddb045a1c5c MD5 | raw file
 1using WatiN.Core;
 2
 3namespace BlogEngine.Tests.PageTemplates.Account
 4{
 5    public class Login : Page
 6    {
 7        private const string userName = "UserName";
 8        private const string password = "Password";
 9        private const string loginButton = "LoginButton";
10        private const string loginLinkId = "ctl00_aLogin";
11
12        public string Url
13        {
14            get { return Constants.Root + "/Account/login.aspx"; }
15        }
16
17        public TextField UserName
18        {
19            get { return Document.TextField(Find.ById(userName)); }
20        }
21
22        public TextField Password
23        {
24            get { return Document.TextField(Find.ById(password)); }
25        }
26
27        public Button LoginButton
28        {
29            get { return Document.Button(Find.ById(loginButton)); }
30        }
31
32        public Link LogoffLink
33        {
34            get { return Document.Link(Find.ById(loginLinkId)); }
35        }
36    }
37}