Пример #1
0
        public static void EditProperty()
        {
            //finding the excle path for input
            Global.ExcelData.PopulateInCollection(CommonFeatures.ExcelPath, "Add Property");

            //To skip the alert
            GenericMethods.ButtonClick(myDriver, "XPath", "/html/body/div[5]/div/div[5]/a[1]");

            Thread.Sleep(1500);

            //navigate to Owners>Properties
            GenericMethods.ButtonClick(myDriver, "XPath", "/html/body/div[1]/div/div[2]/div[1]");
            GenericMethods.ButtonClick(myDriver, "XPath", "/html/body/div[1]/div/div[2]/div[1]/div/a[1]");

            //Checking the right page
            Assert.AreEqual("Properties | Property Community", myDriver.Title);
            //CommonFeatures.test = CommonFeatures.extent.StartTest("In My Properties page");

            //Searching property
            GenericMethods.ButtonClick(myDriver, "XPath", "//body/div[2]/section/div/div/div/div[2]/div/form/div/input");
            GenericMethods.TextBox(myDriver, "XPath", "//body/div[2]/section/div/div/div/div[2]/div/form/div/input", "PropIshanu" + Keys.Enter);

            //editing property
            GenericMethods.ButtonClick(myDriver, "XPath", "//body/div[2]/section/div/div/div[3]/div/div/div[2]/div/div[3]/div/i");
            Thread.Sleep(1500);
            GenericMethods.ButtonClick(myDriver, "XPath", "//body/div[2]/section/div/div/div[3]/div/div/div[2]/div/div[3]/div/div/div[4]");

            GenericMethods.ClearText(myDriver, "XPath", "//body/div[2]/section/div[3]/div[2]/form/div[4]/div//div/input");
            Thread.Sleep(1500);
            GenericMethods.TextBox(myDriver, "XPath", "//body/div[2]/section/div[3]/div[2]/form/div[4]/div//div/input", "800");
            GenericMethods.ButtonClick(myDriver, "XPath", "//body/div[2]/section/div[3]/div[2]/form/div[8]/button");

            //saving screenshot
            var ScreenshotPath = Global.SaveScreenShot.SaveScreenshot(myDriver, "Edit is successful", Global.CommonFeatures.ScreenshotPath);
        }
Пример #2
0
        public static void SortEdit()
        {
            //finding the excle path for input
            Global.ExcelData.PopulateInCollection(CommonFeatures.ExcelPath, "Add Property");

            //editing property
            GenericMethods.ButtonClick(myDriver, "XPath", "//body/div[2]/section/div/div/div[3]/div/div/div[2]/div/div[3]/div/i");
            Thread.Sleep(1500);
            GenericMethods.ButtonClick(myDriver, "XPath", "//body/div[2]/section/div/div/div[3]/div/div/div[2]/div/div[3]/div/div/div[4]");

            GenericMethods.ClearText(myDriver, "XPath", "//body/div[2]/section/div[3]/div[2]/form/div[4]/div//div/input");
            Thread.Sleep(1500);
            GenericMethods.TextBox(myDriver, "XPath", "//body/div[2]/section/div[3]/div[2]/form/div[4]/div//div/input", "800");
            GenericMethods.ButtonClick(myDriver, "XPath", "//body/div[2]/section/div[3]/div[2]/form/div[8]/button");
            //Edit is successful
            CommonFeatures.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Edit is successful");
            //saving screenshot
            var ScreenshotPath = Global.SaveScreenShot.SaveScreenshot(myDriver, "Edit is successful", Global.CommonFeatures.ScreenshotPath);
        }