Пример #1
0
        /// <summary>
        /// Gets the text from a cell of a table.
        /// </summary>
        /// <param name="tableCellAddress">table id</param>
        /// <param name="row">row value of the cell</param>
        /// <param name="column">column value of the cell</param>
        /// <returns>the text from the specified cell</returns>
        public string GetTableCell(string tableCellAddress, int row, int column)
        {
            string cellValue = string.Empty;

            cellValue = _selenium.GetTable(@"{0}.{1}.{2}".FormatWith(tableCellAddress, row, column));
            return(cellValue);
        }
Пример #2
0
        public void TestMethod2()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://localhost:1987");
            selenium.Start();
            selenium.Open("/WebSite1/");
            selenium.Type("MainContent_TextBox1", "HUM");
            selenium.Click("MainContent_Button1");
            selenium.WaitForPageToLoad("3000770");

            //Get the Table Value of Row 1 and Coulumn 2
            object GG = selenium.GetTable("MainContent_GridView1.1.2");

            Assert.AreEqual("1", "1");
            try
            {
                selenium.Stop();
            }
            catch (Exception)
            {
                // Ignore errors if unable to close the browser
            }
        }
Пример #3
0
 public void TestMethod4()
 {
     selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://localhost:1987");
     selenium.Start();
     selenium.Open("/WebSite1/");
     selenium.Type("MainContent_TextBox1", "HUM");
     selenium.Click("MainContent_Button1");
     selenium.WaitForPageToLoad("3000770");
     object GG = selenium.GetTable("MainContent_GridView1.1.2");
     Assert.AreEqual("1", "1");
 }