Exemplo n.º 1
0
 //Go to Testing Client
 void goToClient(FieldValidationHelper helper, ExecutionLog log)
 {
     VisitOffice("clients");
     helper.WaitForWorkAround(1000);
     helper.TypeText("CompanySearch", "Yang Test");
     helper.ClickElement("YangTest");
     helper.WaitForWorkAround(3000);
     helper.ClickElement("CompanyDetails");
     helper.WaitForWorkAround(3000);
 }
Exemplo n.º 2
0
 //Go to Field properties and choose test field Company Legal Name
 void goToFP(FieldValidationHelper helper, ExecutionLog log)
 {
     log.Log("FieldValidationFrame", "Go to field properity");
     VisitOffice("fields");
     helper.WaitForWorkAround(1000);
     log.Log("FieldValidationFrame", "Select module");
     helper.Select("Module", "20");
     helper.WaitForWorkAround(2000);
     log.Log("FieldValidationFrame", "Select Processor");
     helper.Select("Processor", "3291");
     helper.WaitForWorkAround(2000);
     log.Log("FieldValidationFrame", "Select Tab");
     helper.Select("Tab", "14864");
     helper.WaitForWorkAround(5000);
     helper.ClickElement("Search");
     log.Log("FieldValidationFrame", "Select company legal name");
     helper.WaitForWorkAround(1000);
     helper.ClickElement("ClientLegalName");
 }
Exemplo n.º 3
0
 //change data format validation
 void changeDataFormat(FieldValidationHelper helper, string dataFormat, ExecutionLog log)
 {
     goToFP(helper, log);
     log.Log("FieldValidationFrame", "clear all checkbox");
     clearAllChoice(helper, log);
     helper.WaitForWorkAround(5000);
     log.Log("FieldValidationFrame", "check cooresponding data format");
     helper.ClickElement("FieldFormat");
     helper.Select("FieldFormatBox", dataFormat);
     helper.ClickElement("SaveVali");
 }
Exemplo n.º 4
0
        void checkMandatory(FieldValidationHelper helper, ExecutionLog log)
        {
            log.Log("FieldValidationFrame", "check validation:Mandatory");
            goToFP(helper, log);
            log.Log("FieldValidationFrame", "check mandatory");
            clearAllChoice(helper, log);
            helper.ClickElement("Mandatory");
            log.Log("FieldValidationFrame", "check field length");
            helper.ClickElement("FieldLength");
            helper.TypeText("LengthMin", "5");
            helper.TypeText("LengthMax", "10");
            log.Log("FieldValidationFrame", "save validation");
            helper.ClickElement("SaveVali");

            log.Log("FieldValidationFrame", "go to client");
            goToClient(helper, log);
            log.Log("FieldValidationFrame", "mandatory check:no input");
            helper.ClearText("LegalNameInput");
            helper.ClickElement("Save");
            helper.WaitForWorkAround(500);
            helper.verifyElementPresent("ErrorMes");
            log.Log("FieldValidationFrame", "mandatory no input pass");

            log.Log("FieldValidationFrame", "field length: check short input");
            helper.ClearText("LegalNameInput");
            helper.TypeText("LegalNameInput", "55");
            helper.ClickElement("Save");
            helper.verifyElementPresent("ErrorMes");
            log.Log("FieldValidationFrame", "short input pass");

            log.Log("FieldValidationFrame", "field length: check long input");
            helper.ClearText("LegalNameInput");
            helper.TypeText("LegalNameInput", "jjiiawethfjiwe");
            helper.ClickElement("Save");
            string nameinput = helper.GetTextContent("LegalNameInput");

            Assert.IsTrue(nameinput.Length == 10);
            log.Log("FieldValidationFrame", "field length: long input pass");
        }