PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/BlogEngine/BlogEngine.Tests/PageTemplates/Admin/EditPost.cs

#
C# | 28 lines | 23 code | 4 blank | 1 comment | 0 complexity | 751ebab168dc3b6a8fa7bc45f312a8d5 MD5 | raw file
 1using WatiN.Core;
 2
 3namespace BlogEngine.Tests.PageTemplates.Admin
 4{
 5    public class EditPost : Page
 6    {
 7        public string Url
 8        {
 9            get { return Constants.Root + "/admin/Posts/Add_entry.aspx"; }
10        }
11
12        public TextField PostTitle
13        {
14            get { return Document.TextField(Find.ById("ctl00_cphAdmin_txtTitle")); }
15        }
16
17        // tinyMCE uses frames to simulate text area, need javascript hack as workaround
18        public string JsHack
19        {
20            get { return "document.getElementById('ctl00_cphAdmin_txtContent_TinyMCE1_txtContent_ifr').contentWindow.document.body.innerHTML = 'This is WATIN test post.';"; }
21        }
22
23        public Button Save
24        {
25            get { return Document.Button(Find.ById("btnSave")); }
26        }
27    }
28}