예제 #1
0
파일: REO.cs 프로젝트: ibanPak/Selenium3
        public static void AddAgent()
        {
            SeleniumSetMethods.Wait(ElementType.CssSelector, "a[href *= 'AM_PROPEDIT']");
            SeleniumSetMethods.Click(ElementType.CssSelector, "a[href *= 'AM_PROPEDIT']");

            // Add Edit this Property iFrame
            SeleniumWindowMethods.iFrame("externalSite");
            SeleniumSetMethods.Clear(ElementType.Name, "pdUpb");
            SeleniumSetMethods.EnterText(ElementType.Name, "pdUpb", "350000");
            SeleniumSetMethods.Click(ElementType.Name, "btnUpdate");

            // Focus Main page
            SeleniumWindowMethods.WindowType(WinType.Main);
            Global.ConsoleOut("Window Title: " + PropertiesCollection.driver.Title);
            SeleniumSetMethods.Wait(ElementType.CssSelector, "a[href *= 'AM_PROPINS']");
            SeleniumSetMethods.Click(ElementType.CssSelector, "a[href *= 'AM_PROPINS']");
            Global.ConsoleOut("The value for this field should be ($350,000): "
                              + SeleniumGetMethods.GetTextValue(ElementType.Name, "piFcBal"));
            SeleniumSetMethods.Wait(ElementType.CssSelector, "#column2 > tbody:nth-child(1) > tr:nth-child(3) > td:nth-child(1) > a:nth-child(1)");
            SeleniumSetMethods.Click(ElementType.CssSelector, "#column2 > tbody:nth-child(1) > tr:nth-child(3) > td:nth-child(1) > a:nth-child(1)");

            // Assign Agent
            SeleniumWindowMethods.iFrame("imsb-iframe");
            SeleniumSetMethods.Wait(ElementType.Name, "apsFirst");
            SeleniumSetMethods.EnterText(ElementType.Name, "apsFirst", "ivan");
            SeleniumSetMethods.Click(ElementType.CssSelector, "input.btnGreen");
            SeleniumWindowMethods.Sleep(1);
            SeleniumSetMethods.Wait(ElementType.Name, "btnAssign_250922");
            SeleniumSetMethods.Click(ElementType.Name, "btnAssign_250922");

            //Pre Marketing Tab
            SeleniumWindowMethods.Sleep(3);
            SeleniumSetMethods.Wait(ElementType.CssSelector, "a[href *= 'AM_PROPPREMKT']");
            SeleniumSetMethods.Click(ElementType.CssSelector, "a[href *= 'AM_PROPPREMKT']");

            SeleniumSetMethods.Clear(ElementType.Name, "pmBpoOrdDt");
            SeleniumSetMethods.Click(ElementType.Id, "InputForm");
            SeleniumWindowMethods.Sleep(1);
            SeleniumSetMethods.Clear(ElementType.Name, "pmBpoDueDt");
            SeleniumSetMethods.Click(ElementType.Id, "InputForm");

            SeleniumSetMethods.EnterText(ElementType.Name, "pmBpoOrdDt", Global.MMddyyDate);
            SeleniumWindowMethods.Sleep(1);
            SeleniumSetMethods.Click(ElementType.Id, "InputForm");
            SeleniumSetMethods.EnterText(ElementType.Name, "pmBpoDueDt", Global.NextMonth);
            SeleniumWindowMethods.Sleep(1);
            SeleniumSetMethods.Click(ElementType.Id, "InputForm");

            SeleniumSetMethods.Click(ElementType.Name, "btnUpdate");
        }
예제 #2
0
        public static void CreateNewAppraisal(string ClientID, string ProductType, string ProductDetails, string StreetName, string City, string FullState, string ZipCode)
        {
            // Order Queue Page
            SeleniumSetMethods.Wait(ElementType.LinkText, "Clear");
            SeleniumSetMethods.Click(ElementType.LinkText, "Clear");
            SeleniumSetMethods.Wait(ElementType.Id, "btnSearchOrders");
            SeleniumSetMethods.Click(ElementType.Id, "btnSearchOrders");

            // Add New Order
            SeleniumSetMethods.Wait(ElementType.LinkText, "Add New Order");
            SeleniumSetMethods.Click(ElementType.LinkText, "Add New Order");
            SeleniumSetMethods.Wait(ElementType.Id, "ClientId");
            SeleniumSetMethods.SelectDropDown(ElementType.Id, "ClientId", ClientID);
            SeleniumSetMethods.EnterText(ElementType.Id, "LoanNumb", Global.LoanNum);
            Global.ConsoleOut("Loan Number: " + Global.LoanNum);
            SeleniumSetMethods.SelectDropDown(ElementType.Id, "ProductType", ProductType);
            SeleniumWindowMethods.Sleep(2);
            SeleniumSetMethods.SelectDropDown(ElementType.Id, "ProductDetails", ProductDetails);
            SeleniumSetMethods.SelectDropDown(ElementType.Id, "Purpose", "New Loan Purchase");
            SeleniumSetMethods.SelectDropDown(ElementType.Id, "PropertyType", "Single Family");
            SeleniumSetMethods.SelectDropDown(ElementType.Id, "OccupancyStatus", "Unknown");
            SeleniumSetMethods.EnterText(ElementType.Id, "Portfolio", "Automated");
            SeleniumSetMethods.SelectDropDown(ElementType.Id, "LoanType", "Conv");
            Global.StreetAddress = (Global.StreetNum + " " + StreetName);
            Global.ConsoleOut("Street Address: " + Global.StreetAddress);
            SeleniumSetMethods.EnterText(ElementType.Id, "SubjectAddress", Global.StreetAddress);
            SeleniumSetMethods.EnterText(ElementType.Id, "SubjectCity", City);
            SeleniumSetMethods.SelectDropDown(ElementType.Id, "SubjectState", FullState);
            SeleniumSetMethods.EnterText(ElementType.Id, "SubjectPostalCode", ZipCode);
            SeleniumSetMethods.EnterText(ElementType.Id, "BorrowerName", "Hello Kitty");
            SeleniumSetMethods.EnterText(ElementType.Id, "BorrowerPhone", "9493335432");
            SeleniumSetMethods.SelectDropDown(ElementType.Id, "TenderTypeCode", "Invoice");
            SeleniumSetMethods.Click(ElementType.Id, "btnOrderSave");
            SeleniumSetMethods.Wait(ElementType.CssName, "img.lookupPopupIcon");

            // Get Order ID from Order Details page
            string OrderID = SeleniumGetMethods.GetTextContent(ElementType.CssSelector, "div.padding-5:nth-child(3) > b:nth-child(2)").TrimStart();

            Global.OrderID = OrderID;
            Global.ConsoleOut("Order ID: " + OrderID);

            // Screen Capture
            SeleniumWindowMethods.Sleep(1);
            SeleniumWindowMethods.ScreenShot("Acme Appraisal");
        }
예제 #3
0
파일: REO.cs 프로젝트: ibanPak/Selenium3
        public static void AddNewProperty(string StreetName)
        {
            // Properties - Add New Property
            SeleniumSetMethods.Wait(ElementType.LinkText, "Properties");
            SeleniumSetMethods.Click(ElementType.LinkText, "Properties");
            SeleniumSetMethods.Wait(ElementType.CssSelector, "span.ui-button-text");
            SeleniumSetMethods.Click(ElementType.CssSelector, "span.ui-button-text");
            Global.ConsoleOut("Window Title: " + PropertiesCollection.driver.Title);

            // Add New Property iFrame
            SeleniumWindowMethods.iFrame("externalSite");
            SeleniumSetMethods.Click(ElementType.CssSelector, "a[href *= 'AM_POP_CLIENTPA']");
            Global.ConsoleOut("Open Popup - New Property");

            // Client - Popup
            SeleniumWindowMethods.WindowType(WinType.Popup);
            Global.ConsoleOut("Window Title: " + PropertiesCollection.driver.Title);
            SeleniumSetMethods.Wait(ElementType.Name, "csClientId");
            SeleniumSetMethods.EnterText(ElementType.Name, "csClientId", "7224");
            SeleniumSetMethods.Wait(ElementType.Name, "btnRedraw");
            SeleniumSetMethods.Click(ElementType.Name, "btnRedraw");
            SeleniumWindowMethods.WindowType(WinType.Popup);
            Global.ConsoleOut("Window Title: " + PropertiesCollection.driver.Title);
            SeleniumSetMethods.Click(ElementType.CssSelector, "img");
            Global.ConsoleOut("Popup closing");

            // Switch back to main window - Asset Manager Popup
            SeleniumWindowMethods.WindowType(WinType.Main);
            Global.ConsoleOut("Window Title: " + PropertiesCollection.driver.Title);
            SeleniumWindowMethods.iFrame("externalSite");
            SeleniumSetMethods.Click(ElementType.CssSelector, "a[href *= 'AM_POP_AMGRPA']");
            SeleniumWindowMethods.WindowType(WinType.Popup);
            SeleniumSetMethods.Wait(ElementType.Name, "msAmId");
            SeleniumSetMethods.EnterText(ElementType.Name, "msAmId", "3287");
            SeleniumSetMethods.Wait(ElementType.Name, "btnRedraw");
            SeleniumSetMethods.Click(ElementType.Name, "btnRedraw");
            SeleniumSetMethods.Click(ElementType.CssSelector, "img");

            // Switch back to main window - File Manager Popup
            SeleniumWindowMethods.WindowType(WinType.Main);
            Global.ConsoleOut("Window Title: " + PropertiesCollection.driver.Title);
            SeleniumWindowMethods.iFrame("externalSite");
            SeleniumSetMethods.Click(ElementType.CssSelector, "a[href *= 'AM_POP_AMGRPA2']");
            SeleniumWindowMethods.WindowType(WinType.Popup);
            SeleniumSetMethods.Wait(ElementType.Name, "msAmId");
            SeleniumSetMethods.Clear(ElementType.Name, "msAmId");
            SeleniumSetMethods.Wait(ElementType.Name, "btnRedraw");
            SeleniumSetMethods.Click(ElementType.Name, "btnRedraw");
            SeleniumSetMethods.Wait(ElementType.CssSelector, "a[href *= 'Jon1']");
            SeleniumSetMethods.Click(ElementType.CssSelector, "a[href *= 'Jon1']");

            // Switch back to main window - Asset Manager Popup
            SeleniumWindowMethods.WindowType(WinType.Main);
            Global.ConsoleOut("Window Title: " + PropertiesCollection.driver.Title);
            SeleniumWindowMethods.iFrame("externalSite");

            Global.StreetAddress = (Global.StreetNum + " " + StreetName);
            Global.ConsoleOut("Street Address: " + Global.StreetAddress);
            SeleniumSetMethods.Wait(ElementType.Name, "paPropAddr");
            SeleniumSetMethods.EnterText(ElementType.Name, "paPropAddr", Global.StreetAddress);
            SeleniumSetMethods.EnterText(ElementType.Name, "paPropCity", "Irvine");
            SeleniumSetMethods.SelectDropDown(ElementType.Name, "paPropState", "California");
            SeleniumSetMethods.EnterText(ElementType.Name, "paPropZip", "92620");

            // Loan Information
            SeleniumSetMethods.EnterText(ElementType.Name, "Loan_Number", Global.LoanNum);
            SeleniumSetMethods.EnterText(ElementType.Name, "Borrower_First", "FirstName");
            SeleniumSetMethods.EnterText(ElementType.Name, "Borrower_Last", "LastName");
            SeleniumSetMethods.SelectDropDown(ElementType.Name, "paPropType", "SFR");

            // Add Attorney - Popup
            SeleniumSetMethods.Click(ElementType.CssSelector, "a[href *= 'AM_POP_FCATTNYPA']");
            Global.ConsoleOut("Open Popup - Attorney");
            SeleniumWindowMethods.Sleep(2);
            SeleniumWindowMethods.WindowType(WinType.Popup);
            Global.ConsoleOut("Window Title: " + PropertiesCollection.driver.Title);
            SeleniumSetMethods.Click(ElementType.CssSelector, "a[href *= 'Just']");

            // Switch back to main window
            SeleniumWindowMethods.WindowType(WinType.Main);
            Global.ConsoleOut("Window Title: " + PropertiesCollection.driver.Title);
            SeleniumWindowMethods.iFrame("externalSite");
            SeleniumSetMethods.EnterText(ElementType.Name, "Fc_Saledt", Global.LastMonth);
            SeleniumSetMethods.EnterText(ElementType.Name, "Unpd_Bal", "250000");
            SeleniumSetMethods.EnterText(ElementType.Name, "Fc_Apr_Value", "500000");
            SeleniumSetMethods.EnterText(ElementType.Name, "Fc_Apr_Dte", Global.LastYear);
            SeleniumSetMethods.EnterText(ElementType.Name, "txtpaNote", "Do you want to build a snowman?");
            SeleniumSetMethods.Click(ElementType.Name, "txtpaNote");
            SeleniumSetMethods.Click(ElementType.Name, "btnAdd");
            SeleniumWindowMethods.Sleep(3);

            // Get Property ID from Property Details page

            try
            {
                string PropertyID = SeleniumGetMethods.GetTextContent(ElementType.CssSelector, "#selectedProperty > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2)").TrimStart();
                Global.OrderID = PropertyID;
                Global.ConsoleOut("Property ID: " + PropertyID);;
            }
            catch
            {
                SeleniumSetMethods.Wait(ElementType.Name, "btnAdd");
                SeleniumSetMethods.Click(ElementType.Name, "btnAdd");
                SeleniumWindowMethods.Sleep(2);
                string PropertyID = SeleniumGetMethods.GetTextContent(ElementType.CssSelector, "#selectedProperty > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2) > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2)").TrimStart();
                Global.OrderID = PropertyID;
                Global.ConsoleOut("Property ID: " + PropertyID);;
            }


            // Screen Capture
            SeleniumWindowMethods.Sleep(1);
            SeleniumWindowMethods.ScreenShot("REO New Property");
        }