Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. public class BasePage<M>
  2. where M : BasePageElementMap, new()
  3. {
  4. protected readonly string url;
  5.  
  6. public BasePage(string url)
  7. {
  8. this.url = url;
  9. }
  10.  
  11. public BasePage()
  12. {
  13. this.url = null;
  14. }
  15.  
  16. protected M Map
  17. {
  18. get
  19. {
  20. return new M();
  21. }
  22. }
  23.  
  24. public virtual void Navigate(string part = "")
  25. {
  26. Driver.Browser.Navigate().GoToUrl(string.Concat(url, part));
  27. }
  28. }
  29.  
  30. public class BasePage<M, V> : BasePage<M>
  31. where M : BasePageElementMap, new()
  32. where V : BasePageValidator<M>, new()
  33. {
  34. public BasePage(string url) : base(url)
  35. {
  36. }
  37.  
  38. public BasePage()
  39. {
  40. }
  41.  
  42. public V Validate()
  43. {
  44. return new V();
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement