replace branch lighter's file to master

This commit is contained in:
hanzhichao 2017-11-22 15:07:41 +08:00
parent 5bfb167a9a
commit a319f5c63f
25 changed files with 104 additions and 91 deletions

View File

@ -23,13 +23,13 @@ db=spicespirit
user=root
passwd=spice
#test env host
# test env host
[server]
host=192.168.100.241
user=root
password=1234567
#redis server
# redis server
[redis]
host=192.158.100.237
user=root

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -82,3 +82,16 @@
2017-11-22 11:43:58,842 - DEBUG: return self.find_input_by_label(label).get_attribute('value')---find_input_by_label---0.062s
2017-11-22 11:43:58,853 - DEBUG: customer_phone = page.get_input_value('会员电话:')---get_input_value---0.075s
2017-11-22 11:43:58,903 - DEBUG: self.find_element(By.CLASS_NAME, 'btn-bg1').click()---find_element---0.050s
2017-11-22 14:50:58,664 - DEBUG: self.open(login_url)---open---0.270s
2017-11-22 14:50:59,730 - DEBUG: input_elm = self.find_element(*label)---find_element---0.062s
2017-11-22 14:50:59,940 - DEBUG: self.type(self.input_username_loc, username)---type---0.275s
2017-11-22 14:50:59,987 - DEBUG: input_elm = self.find_element(*label)---find_element---0.045s
2017-11-22 14:51:00,134 - DEBUG: self.type(self.input_password_loc, password)---type---0.193s
2017-11-22 14:51:00,171 - DEBUG: self.find_element(*text).click()---find_element---0.036s
2017-11-22 14:51:00,271 - DEBUG: self.click(self.btnLogin_loc)---click---0.137s
2017-11-22 15:02:09,653 - DEBUG: self.open(login_url)---open---0.370s
2017-11-22 15:02:10,719 - DEBUG: input_elm = self.find_element(*label)---find_element---0.062s
2017-11-22 15:07:06,362 - DEBUG: self.open(login_url)---open---0.316s
2017-11-22 15:07:07,426 - DEBUG: input_elm = self.find_element(*label)---find_element---0.061s
2017-11-22 15:07:07,623 - DEBUG: self.type(self.input_username_loc, username)---type---0.260s
2017-11-22 15:07:07,660 - DEBUG: input_elm = self.find_element(*label)---find_element---0.036s

Binary file not shown.

View File

@ -1,36 +1,36 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
import unittest
from page_obj.base_page import BasePage
from page_obj.index.index.login import LoginPage
from util.browser import Chrome
class BaseCase(unittest.TestCase):
type = 'normal' # normal, smoke, snacirors
level = 1 # 1-5
times = 1
concurrency = 1
timeout = 0
skip = False
def prepare(self):
pass
def clean(self):
pass
def setUp(self):
# self.driver = Chrome.normal()
self.driver = Chrome.headless()
self.driver.implicitly_wait(10)
self.driver.maximize_window()
page = LoginPage(self.driver)
page.login()
def tearDown(self):
page = BasePage(self.driver)
page.logout()
self.driver.quit()
# !/usr/bin/env python
# -*- coding=utf-8 -*-
import unittest
from page_obj.base_page import BasePage
from page_obj.index.index.login import LoginPage
from util.browser import Chrome
class BaseCase(unittest.TestCase):
type = 'normal' # normal, smoke, snacirors
level = 1 # 1-5
times = 1
concurrency = 1
timeout = 0
skip = False
def prepare(self):
pass
def clean(self):
pass
def setUp(self):
# self.driver = Chrome.normal()
self.driver = Chrome.headless()
self.driver.implicitly_wait(10)
self.driver.maximize_window()
page = LoginPage(self.driver)
page.login()
def tearDown(self):
page = BasePage(self.driver)
page.logout()
self.driver.quit()

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,53 +1,53 @@
# !/usr/bin/env python
# -*- coding=utf-8 -*-
from util.data_file_parser import ConfFile
from util.root import CONFIG_FILE
class Config(object):
conf = ConfFile.load(CONFIG_FILE)
def __init__(self, config_file=CONFIG_FILE):
self.conf = ConfFile.load(config_file)
@classmethod
def section(cls, section):
return cls.conf[section]
@classmethod
def option(cls, section, option):
section_dict = cls.section(section)
return section_dict[option]
class Property(object):
@staticmethod
def _match_property(page):
page_elm_file = page.replace('page_obj', 'page_elm').replace('.py', '.property')
return page_elm_file
@staticmethod
def load(_property):
_property['page_obj']['menu'] = tuple(_property['page_obj']['menu'].split(','))
_elements = _property['element']
for element in _elements:
_elements[element] = tuple(_elements[element].split(','))
_db_map = _property['db_map']
for element in _db_map:
_db_map[element] = tuple(_db_map[element].split(','))
_property['element'] = _elements
_property['db_map'] = _db_map
return _property
def __init__(self, page):
_property = ConfFile.load(self._match_property(page))
self.property = self.load(_property)
if __name__ == '__main__':
print(Config.conf)
# !/usr/bin/env python
# -*- coding=utf-8 -*-
from util.data_file_parser import ConfFile
from util.root import CONFIG_FILE
class Config(object):
conf = ConfFile.load(CONFIG_FILE)
def __init__(self, config_file=CONFIG_FILE):
self.conf = ConfFile.load(config_file)
@classmethod
def section(cls, section):
return cls.conf[section]
@classmethod
def option(cls, section, option):
section_dict = cls.section(section)
return section_dict[option]
class Property(object):
@staticmethod
def _match_property(page):
page_elm_file = page.replace('page_obj', 'page_elm').replace('.py', '.property')
return page_elm_file
@staticmethod
def load(_property):
_property['page_obj']['menu'] = tuple(_property['page_obj']['menu'].split(','))
_elements = _property['element']
for element in _elements:
_elements[element] = tuple(_elements[element].split(','))
_db_map = _property['db_map']
for element in _db_map:
_db_map[element] = tuple(_db_map[element].split(','))
_property['element'] = _elements
_property['db_map'] = _db_map
return _property
def __init__(self, page):
_property = ConfFile.load(self._match_property(page))
self.property = self.load(_property)
if __name__ == '__main__':
print(Config.conf)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.