//   [TestMethod]
        public void residiualIcomeAgentPayoutExportToExcel()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var residualIcomeOfficeHelper = new ResidualIcomeOfficeHelper(GetWebDriver());

            //Variable
            var name = "TestAgent" + GetRandomNumber();

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            residualIcomeOfficeHelper.ClickElement("ResidualIncomeTab");

            //Redirect to Agnet
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/rir/agent_payouts_summary");

            //ClickOnExport
            residualIcomeOfficeHelper.ClickElement("ClickOnExport");
            residualIcomeOfficeHelper.WaitForWorkAround(3000);

            //ExportToExcel
            residualIcomeOfficeHelper.ClickElement("ExportToExcel");
            residualIcomeOfficeHelper.WaitForWorkAround(3000);

            //Click on Excel report button
            //        residualIcomeOfficeHelper.ClickElement("ExcelReoprt");

            var user = residualIcomeOfficeHelper.CurrentUser();

            //Get newly created file name from downloads folder
            var newfilename = residualIcomeOfficeHelper.Getnewfilename(new DirectoryInfo(@"C:\" + user + @"s\" + user + @"\Downloads\"));

            var filepath = @"C:\" + user + @"s\" + user + @"\Downloads\" + newfilename;

            var excelFile = new ExcelQueryFactory(filepath).Worksheet(0);

            var artistAlbums = from a in excelFile select a;
            int i = 0;
            foreach (var a in artistAlbums)
            {
                if (a["Agent Name"] == "Agent Name")
                {
                }
            }
        }
        public void residualIncomeOfficeAdjustmentToolOfficeFlat()
        {
            string[] username = null;
            string[] password = null;

            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            username = oXMLData.getData("settings/Credentials", "username");
            password = oXMLData.getData("settings/Credentials", "password");

            //Initializing the objects
            var loginHelper = new LoginHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var residualIcomeOfficeHelper = new ResidualIcomeOfficeHelper(GetWebDriver());

            //Variable
            var name = "TestAgent" + GetRandomNumber();

            //Login with valid username and password
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

               //Click on Click On Partner Agent
               GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/rir/adjustments_tool");

               //Verify title
               VerifyTitle("Adjustments Tool");

               //Click On Create btn Adjmnt
               residualIcomeOfficeHelper.ClickElement("ClickOnCreateAdjust");

                //EnterAdjustmentName
                residualIcomeOfficeHelper.TypeText("EnterAdjustmentName", "SaleAdjustment");

                //SelectAdjustmentFor
                residualIcomeOfficeHelper.Select("SelectAdjustmentFor", "Office");

                //SelectAdjustmentFor
                residualIcomeOfficeHelper.Select("AdjustmentType", "Transaction");

                //SelectAdjustmentFor
                residualIcomeOfficeHelper.Select("SelectReportingPeriod", "00");

                //SelectProcessor
                residualIcomeOfficeHelper.Select("SelectProcessor", "Any");

                //SelectAdjustmentFor
                residualIcomeOfficeHelper.Select("SelectRuleType", "0");

                //Enter Amount
                residualIcomeOfficeHelper.TypeText("EnterAmount", "200");

                //AddRemove
                residualIcomeOfficeHelper.Select("AddRemove", "Add");

                //ClickOnSaveBtnAdjustmnet
                residualIcomeOfficeHelper.ClickElement("ClickOnSaveBtnAdjustmnet");
                residualIcomeOfficeHelper.WaitForWorkAround(3000);

                //Verify
                residualIcomeOfficeHelper.VerifyPageText("Master Adjustment Rules Created Successfully.");
        }