Ejemplo n.º 1
0
    def start(self):
          
        # Set UP of Automation
        selenium_wrapper.wrapper().StartSelenium()
        selenium_wrapper().wrapper().OpenAppplication()

        suite = unittest.defaultTestLoader.loadTestsFromTestCase(test_AddComp)
        suite.addTests(unittest.defaultTestLoader.loadTestsFromTestCase(test_EditComp))
        suite.addTests(unittest.defaultTestLoader.loadTestsFromTestCase(test_ViewReport))

        report_name = self.get_report_name()
        print report_name
        f=open(str(report_name),"wb+")
        
        runner = HTMLTestRunner(
                    stream=f,
                    title='CMA Report',
                    description='This demonstrates the execution result'
                    )
    
        result = runner.run(suite)

        # Tear Down of Automation
        selenium_wrapper.wrapper().StopSelenium()

        if not result.wasSuccessful():
            sys.exit(1)
Ejemplo n.º 2
0
    def __init__(self):
       self.varSelWrap = selenium_wrapper.wrapper()
       self.lnkViewReport = "link=and see reports."
#       self.repBasePage = BasePage()
       self.selRoleForRep = "id=id_role"
       self.lnkAssessmentOne = "//table[2]/tbody/tr[4]/td[@id='cell352']/a"
       self.lnkAssociateNameOne = "link=Sruthy"
Ejemplo n.º 3
0
 def __init__(self):
     self.varSelWrap = selenium_wrapper.wrapper()
     self.txtEmpNo = "id=emp_no"
     self.butEditSubmit = "//div[@class='center-it submit-button']/input[@type='submit']"
     self.lnkEdit = "link=keep them updated,"
     self.assessLevelOne = "//input[@name='capability35' and @value='2']"
     self.assessLevelTwo = "//input[@name='capability37' and @value='2']"
     self.assessLevelThree = "//input[@name='capability40' and @value='2']"
     self.assessLevelFour = "//input[@name='capability42' and @value='3']"
     self.assessLevelFive = "//input[@name='capability45' and @value='2']"
     self.assessLevelSix = "//input[@name='capability46' and @value='2']"
     self.assessLevelSeven = "//input[@name='capability47' and @value='3']" 
     self.butReSubmit ="//input[@value='Submit my Assessment']"
     self.lblEditSuccessMsg = "//div[@id='new-user']//span[@class='messages']"
     self.lblEditCapErrorMessage = "//table[@id='edit-user']/tbody/tr/td/span[@class='messages']"
Ejemplo n.º 4
0
 def __init__(self):
     self.varSelWrap = selenium_wrapper.wrapper()
     self.lnkAddComp = "link=add your competencies,"
     self.txtEmpId = "id=id_emp_id"
     self.txtName = "id=id_name"
     self.selRole = "id=id_role"
     self.butSubmit ="//input[@value='Submit my Assessment']"
     self.lblSuccessMsg = "//div[@id='new-user']//span[@class='messages']"
     self.assessmentOne = "//input[@name='capability82' and @value='2']"
     self.assessmentTwo = "//input[@name='capability83' and @value='2']"
     self.assessmentThree = "//input[@name='capability85' and @value='2']"
     self.assessmentFour = "//input[@name='capability86' and @value='2']"
     self.assessmentFive = "//input[@name='capability96' and @value='3']"
     self.assessmentSix = "//input[@name='capability97' and @value='3']"
     self.assessmentSeven = "//input[@name='capability98' and @value='3']"
     self.assessmentEight = "//input[@name='capability99' and @value='3']"
     self.ErrormessageForId = "//div[@id='new-user']/table/tbody/tr[2]/td[3]"
     self.ErrormessageForName = "//div[@id='new-user']/table/tbody/tr[3]/td[3]"
     self.ErrormessageForRole = "//div[@id='new-user']/table/tbody/tr[4]/td[3]"