def setUp(self):
     self.driver = initialize_browser()
     # preparing test data
     try:
         file_obj = ParseYaml('project.yml')
         data_dict = file_obj.get_yaml_dict()
         self.URL = data_dict['URL']
         self.UserName = data_dict['UserName']
         self.Password = data_dict['Password']
     except Exception as e:
         logger.error("Failed to open data file!")
         logger.error(e)
Beispiel #2
0
    def setUp(self):
        global loc_links
        self.driver = initialize_browser()

        # prepare test data - fetch page links locator
        try:
            data_file = os.path.dirname(os.path.dirname(__file__)) + "/data/credit_home_links_check.csv"
            data_file = os.path.abspath(data_file)
            data = csv.reader(open(data_file, 'r'))
        except:
            logger.error("Failed to open data file!")

        for line in data:
            if line[0] != "section" and line[0] != "":
                loc_links.append(line[1])
        logger.info("The links are {}".format(loc_links))
 def setUp(self):
     self.driver = initialize_browser()