示例#1
0
        static void Main(string[] args)
        {
            Driver = new ChromeDriver();

            Driver.Navigate().GoToUrl("file:///C:/Users/Sreenath/source/repos/ReadingTables/complexTablePage.html");

            TablePage page = new TablePage();

            //Read Table
            Utilities.ReadTable(page.table);

            //Get the cell value from the table
            //Console.WriteLine(Utilities.ReadCell("Email", 1));

            Console.WriteLine("******************************************************************************");
            Console.WriteLine("The name is {0} with Email {1} and phone {2}",
                              Utilities.ReadCell("Name", 1), Utilities.ReadCell("Email", 1), Utilities.ReadCell("Phone", 1));
            Console.WriteLine("The name is {0} with Email {1} and phone {2}",
                              Utilities.ReadCell("Name", 2), Utilities.ReadCell("Email", 2), Utilities.ReadCell("Phone", 2));
            Console.WriteLine("The name is {0} with Email {1} and phone {2}",
                              Utilities.ReadCell("Name", 3), Utilities.ReadCell("Email", 3), Utilities.ReadCell("Phone", 3));
            Console.WriteLine("*******************************************************************************");

            //Delete Prashanth
            //Utilities.PerformActionOnCell("5", "Name", "Prashanth", "Delete");
            //Utilities.PerformActionOnCell("5", "Name", "Prashanth", "Save");

            Utilities.PerformActionOnCell("Option", "Name", "Prashanth");
            Console.Read();
        }
示例#2
0
        static void Main(string[] args)
        {
            Driver = new ChromeDriver();

            Driver.Navigate().GoToUrl("file:///C:/ComplexTable.html");

            TablePage page = new TablePage();

            // Read table
            Utilities.ReadTable(page.TableElement);

            // Get the cell value from the table
            Console.WriteLine(Utilities.ReadCell("Email", 2));

            Console.WriteLine("The name {0} with Email {1} and Phone {2}",
                              Utilities.ReadCell("Name", 1), Utilities.ReadCell("Email", 1), Utilities.ReadCell("Phone", 1));


            // Delete Cliff
            Utilities.PerformActionOnCell("5", "Name", "Cliff", "Delete");
            Utilities.PerformActionOnCell("Option", "Name", "Cliff");



            Console.Read();
        }
示例#3
0
        static void Main(string[] args)
        {
            Driver = new ChromeDriver();

            Driver.Navigate().GoToUrl("file:///C:/TablePages/SimpleTable.html");

            TablePage page = new TablePage();

            // Read table
            Utilities.ReadTable(page.table);

            Console.WriteLine("-----------------------------------");

            // Get the cell value from the table
            Console.WriteLine("The Name {0} with Email {1} and Phone {2}",
                              Utilities.ReadCell("Name", 2), Utilities.ReadCell("Email", 2), Utilities.ReadCell("Phone", 2));

            Console.Read();
        }
示例#4
0
        static void Main(string[] args)
        {
            Driver = new FirefoxDriver();
            Driver.Navigate().GoToUrl("");

            TablePage page = new TablePage();

            //Read Table
            Utilities.ReadTable(page.table);

            //Get the cell value of each table
            System.Console.WriteLine(Utilities.ReadCell("Email", 1));
            System.Console.WriteLine("The Name {0} with Email {1} and Phone{2}",
                                     Utilities.ReadCell("Name", 2), Utilities.ReadCell("Email", 2), Utilities.ReadCell("Phone", 2));

            //Delete
            Utilities.PerformActionOnCell("5", "Name", "Manny", "Delete");

            Console.Read();
        }
示例#5
0
        public static void Main(string[] args)
        {
            Driver = new FirefoxDriver(@"/Users/JuanCMontoya/Projects/vscode/csharp/ReadingTables/ReadingTables/ReadingTables/bin/Debug");

            // Need to insert an actual html table
            Driver.Navigate().GoToUrl("file:///C:/TablePages/ComplexTable.html");

            TablePage page = new TablePage();

            // Read Table
            Utilities.ReadTable(page.Table);

            Console.WriteLine("*****************************************************************");

            // Get the cell value from the table
            Console.WriteLine("The name {0} with email {1} and phone {2}", Utilities.ReadCell("Name", 2), Utilities.ReadCell("Email", 2), Utilities.ReadCell("Phone", 2));

            Console.WriteLine("*****************************************************************");

            // Delete Prashanth
            Utilities.PerformActionOnCell("5", "Name", "Prashanth", "Delete");

            Console.Read();
        }