PageRenderTime 49ms CodeModel.GetById 18ms RepoModel.GetById 1ms 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
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. using WatiN.Core;
  2. namespace BlogEngine.Tests.PageTemplates.Admin
  3. {
  4. public class EditPost : Page
  5. {
  6. public string Url
  7. {
  8. get { return Constants.Root + "/admin/Posts/Add_entry.aspx"; }
  9. }
  10. public TextField PostTitle
  11. {
  12. get { return Document.TextField(Find.ById("ctl00_cphAdmin_txtTitle")); }
  13. }
  14. // tinyMCE uses frames to simulate text area, need javascript hack as workaround
  15. public string JsHack
  16. {
  17. get { return "document.getElementById('ctl00_cphAdmin_txtContent_TinyMCE1_txtContent_ifr').contentWindow.document.body.innerHTML = 'This is WATIN test post.';"; }
  18. }
  19. public Button Save
  20. {
  21. get { return Document.Button(Find.ById("btnSave")); }
  22. }
  23. }
  24. }