Exemplo n.º 1
0
        public static void CaptureVisibleElements(string sFileName, IWebDriver _driver)
        {
            string DebugMode = GenericFunctions.goAndGet("DebugMode");

            if (DebugMode.ToUpper() == "FALSE")
            {
                Console.WriteLine("CaptureVisibleElements NOT run:  DebugMode = " + DebugMode);
                return;
            }
            String sResults = Globals.Run.PsResultsFolder + sFileName;

            Console.WriteLine("CaptureVisibleElements Starting:  sFileName = " + sFileName);
            if (sFileName.Substring(sFileName.Length - 4, 4).ToUpper() != ".CSV")
            {
                sFileName = sFileName + ".csv";
            }
            DataSet dsPageCheck = ListVisibleElementProperties(_driver);

            //string sResults = Globals.Run.psResultsFolder + sFileName;
            //Console.WriteLine("     dsPageCheck = " + dsPageCheck.Tables.Count);
            Console.WriteLine("     sResults = " + sResults);
            GenericFunctions.ConvertToCSV(dsPageCheck, "ElementProperties", sResults);
            Console.WriteLine("CaptureVisibleElements Finished:  ResultsFileName = " + sResults);
        }