def setUp(self): # self.driver = webdriver.Firefox() self.driver = appobjectcaiwu.GetInstance() self.driver.implicitly_wait(30) conf = ConfigParser.ConfigParser() # conf.read("C:/edaixi_testdata/userdata_caiwu.conf") conf.read(caiwu_utiltools.getcaiwuconfigpath()) global CAIWU_URL, USER_NAME, PASS_WORD, mysqlhostname, mysqlusername, mysqlpassword, mysqlcaiwudb, mysqlrongchangdb CAIWU_URL = conf.get("caiwusection", "uihostname") USER_NAME = conf.get("caiwusection", "uiusername") PASS_WORD = conf.get("caiwusection", "uipassword") print CAIWU_URL, USER_NAME, PASS_WORD mysqlhostname = conf.get("databaseconn", "mysqlhostname") mysqlusername = conf.get("databaseconn", "mysqlusername") mysqlpassword = conf.get("databaseconn", "mysqlpassword") mysqlcaiwudb = conf.get("databaseconn", "mysqlcaiwudb") mysqlrongchangdb = conf.get("databaseconn", "mysqlrongchangdb") print mysqlhostname, mysqlusername, mysqlpassword, mysqlcaiwudb, mysqlrongchangdb self.base_url = CAIWU_URL # self.base_url = "http://caiwu05.edaixi.cn:81/" self.verificationErrors = [] self.accept_next_alert = True
def setUp(self): # self.driver = webdriver.Firefox() self.driver = appobjectcaiwu.GetInstance() self.driver.implicitly_wait(30) conf = ConfigParser.ConfigParser() # conf.read("C:/edaixi_testdata/userdata_caiwu.conf") conf.read(caiwu_utiltools.getcaiwuconfigpath()) global CAIWU_URL, USER_NAME, PASS_WORD CAIWU_URL = conf.get("caiwusection", "uihostname") USER_NAME = conf.get("caiwusection", "uiusername") PASS_WORD = conf.get("caiwusection", "uipassword") # print CAIWU_URL,USER_NAME,PASS_WORD # self.base_url = "http://caiwu05.edaixi.cn:81/" # file.close() self.base_url = CAIWU_URL self.verificationErrors = [] self.accept_next_alert = True