Ejemplo n.º 1
0
        public XPOD_HomePage_Xpodlist SystemView_SelectionValidations(Object DataObj)
        {
            var data        = GetDataAsJsonObject.DataReaderJobject(DataObj, "ViewList");
            int NumberofRec = 2;

            CommonMethods.WebdriverWait_ElementClickable(driver, dd_views());
            SelectElement options = new SelectElement(dd_views());

            for (int i = 0; i <= NumberofRec; i++)
            {
                options.SelectByText((data[i.ToString()]).ToString());

                if (i == 1)
                {
                    Status_Column();
                }
            }
            return(new XPOD_HomePage_Xpodlist(driver));
        }
        public AdvancedFind_Page Method_EditAdvanvedFind_Views(Object DataObj)
        {
            var    data = GetDataAsJsonObject.DataReaderJobject(DataObj, "TestData");
            String strEditedViewName = data["EditViewname"].ToString();
            String strEditViewDesc   = data["EditViewdesc"].ToString();

            CommonMethods.WebdriverWait_TillElementReady(driver, Txtbox_ViewName());
            Txtbox_ViewName().Clear();
            CommonMethods.WebdriverWait_TillElementReady(driver, Txtbox_ViewName());
            Txtbox_ViewName().SendKeys(strEditedViewName);
            CommonMethods.WebdriverWait_TillElementReady(driver, Txtbox_ViewDescription());
            Txtbox_ViewDescription().Clear();
            CommonMethods.WebdriverWait_TillElementReady(driver, Txtbox_ViewDescription());
            Txtbox_ViewDescription().SendKeys(strEditViewDesc);
            //Method_Remove_AllFilter();
            //Thread.Sleep(2000);
            //Btn_AddFilter().Click();
            Method_AddSourceOSC_Filter();
            Assert.True(Btn_SaveView().Enabled);
            return(new AdvancedFind_Page(driver));
        }
        public XPOD_ValidationResponse_Page Method_ValidateResponsesInMultiselectValues(Object DataObj, String TestData, int NoResp)
        {
            var data = GetDataAsJsonObject.DataReaderJobject(DataObj, TestData);

            CommonMethods.WebdriverWait_ElementClickable(driver, MultiSelect_Resp());
            SelectElement       options     = new SelectElement(MultiSelect_Resp());
            IList <IWebElement> ViewOptions = options.Options;

            if (NoResp == 0)

            {
                foreach (var Ele in ViewOptions)
                {
                    Assert.Equal(data["0"].ToString().Trim(), Ele.Text.Trim());
                    break;
                }
            }
            else
            {
                for (int i = 1; i <= NoResp; i++)
                {
                    String s       = i.ToString();
                    int    counter = 0;
                    foreach (var Ele in ViewOptions)
                    {
                        if ((data[s].ToString().Trim()).Equals(Ele.Text.Trim()))
                        {
                            counter = counter + 1;
                            break;
                        }
                    }
                    Assert.NotEqual(0, counter);
                }
            }
            return(new XPOD_ValidationResponse_Page(driver));
        }
        /// <summary>
        /// This method is to Edit the existing fields and save
        /// </summary>
        /// <returns></returns>
        public XPOD_InstallationSec_Page FieldEdit_Validation(Object DataObj)
        {
            var data = GetDataAsJsonObject.DataReaderJobject(DataObj, "InstallationSec");

            Txtbox_Addressline1().Clear();
            Txtbox_Addressline1().SendKeys(data["Addressline1"].ToString());
            Txtbox_Addressline2().Clear();
            Txtbox_Addressline2().SendKeys(data["Addressline2"].ToString());
            Txtbox_City().Clear();
            Txtbox_City().SendKeys(data["City"].ToString());
            Txtbox_State().Clear();
            Txtbox_State().SendKeys(data["State"].ToString());
            Txtbox_Country().Clear();
            Txtbox_Country().SendKeys(data["Country"].ToString());
            Txtbox_ZipCode().Clear();
            Txtbox_ZipCode().SendKeys(data["Zipcode"].ToString());

            CommonMethods.WebdriverWait_ElementClickable(driver, Btn_SaveInstallInfo());
            CommonMethods.Page_Scrolldown(driver);
            Btn_SaveInstallInfo().Click();
            //CommonMethods.Page_ScrollUp(driver);

            return(new XPOD_InstallationSec_Page(driver));
        }