コード例 #1
0
        public void ShouldChooseFullTableLayoutWhenHasTheadAndThs()
        {
            Selenium.Setup(o => o.GetXpathCount("id('tableId')/thead")).Returns(1);
            Selenium.Setup(o => o.GetXpathCount("id('tableId')//th")).Returns(1);

            var chooser = new TableLayoutChooser(Selenium.Object, "tableId");
            ITableLayout layout = chooser.GetLayout();

            Assert.IsInstanceOfType(layout, typeof(FullTableLayout));
        }
コード例 #2
0
        public void ShouldChoosePlainTablePlusThLayoutWhenHasThsButDoesNotHaveThead()
        {
            Selenium.Setup(o => o.GetXpathCount("id('tableId')/thead")).Returns(0);
            Selenium.Setup(o => o.GetXpathCount("id('tableId')//th")).Returns(1);

            var chooser = new TableLayoutChooser(Selenium.Object, "tableId");
            ITableLayout layout = chooser.GetLayout();

            Assert.IsInstanceOfType(layout, typeof(PlainTablePlusThLayout));
        }
コード例 #3
0
 public void ShouldChoosePlainTablePlusThLayoutWhenHasThsButDoesNotHaveThead()
 {
     OpenPlainTablePlusTh();
     var layout = new TableLayoutChooser(Browser.GetDelegate(), "oneTable").GetLayout();
     Assert.IsInstanceOfType(layout, typeof(PlainTablePlusThLayout));
 }
コード例 #4
0
 public void ShouldChooseFullTableLayoutWhenHasTheadAndThs()
 {
     OpenFullTable();
     var layout = new TableLayoutChooser(Browser.GetDelegate(), "oneTable").GetLayout();
     Assert.IsInstanceOfType(layout, typeof(FullTableLayout));
 }
コード例 #5
0
ファイル: Page.cs プロジェクト: caelum/NET-Selenium-DSL
 public ITable Table(string id)
 {
     var layout = new TableLayoutChooser(_selenium, id).GetLayout();
     return new Table.Table(_selenium, layout, id);
 }