示例#1
0
        public static void OpenedEmptyPage()
        {
            String uri = new Uri(Path.Combine(
                                     runFromAssemblyLocation ? Assembly.GetExecutingAssembly().Location : Directory.GetCurrentDirectory(), emptyPage)).AbsoluteUri;

            Selene.Open(uri);
        }
示例#2
0
 public static void OpenedEmptyPage()
 {
     Selene.Open(
         new Uri(
             new Uri(Assembly.GetExecutingAssembly().Location),
             "../../../Resources/empty.html"
             ).AbsoluteUri
         );
 }
示例#3
0
 public void Visit()
 {
     Selene.Open("https://todomvc4tasj.herokuapp.com/");
     Selene.WaitTo(Have.JSReturnedTrue(
                       "return " +
                       "$._data($('#new-todo').get(0), 'events').hasOwnProperty('keyup')&& " +
                       "$._data($('#toggle-all').get(0), 'events').hasOwnProperty('change') && " +
                       "$._data($('#clear-completed').get(0), 'events').hasOwnProperty('click')"));
 }
        public void FilterTasks()
        {
            Selene.Open("https://todomvc4tasj.herokuapp.com/");

            Selene.WaitTo(Have.JSReturnedTrue(
                              "return " +
                              "$._data($('#new-todo').get(0), 'events').hasOwnProperty('keyup')&& " +
                              "$._data($('#toggle-all').get(0), 'events').hasOwnProperty('change') && " +
                              "$._data($('#clear-completed').get(0), 'events').hasOwnProperty('click')"));

            Selene.S("#new-todo").SetValue("a").PressEnter();
            Selene.S("#new-todo").SetValue("b").PressEnter();
            Selene.S("#new-todo").SetValue("c").PressEnter();
            Selene.SS("#todo-list>li").Should(Have.ExactTexts("a", "b", "c"));

            Selene.SS("#todo-list>li").FindBy(Have.ExactText("b")).Find(".toggle").Click();

            Selene.S(By.LinkText("Active")).Click();
            Selene.SS("#todo-list>li").FilterBy(Be.Visible).Should(Have.ExactTexts("a", "c"));

            Selene.S(By.LinkText("Completed")).Click();
            Selene.SS("#todo-list>li").FilterBy(Be.Visible).Should(Have.ExactTexts("b"));
        }
示例#5
0
 public static void Open()
 {
     Selene.Open("http://google.com/ncr");
 }
示例#6
0
 internal void Open()
 {
     Selene.Open("https://www.ecosia.org/");
 }
示例#7
0
 internal void Open()
 {
     Selene.Open("https://duckduckgo.com/");
 }