Ejemplo n.º 1
0
    def test_login(self):
        self.index_proxy = IndexProxy()
        self.login_proxy = LoginProxy()

        self.index_proxy.to_login_page()

        self.login_proxy.login("15711111112", "123456", "8888")
Ejemplo n.º 2
0
 def setUpClass(cls):
     # 获取浏览器驱动对象
     cls.driver = DriverUtil.get_driver()
     cls.indexproxy = IndexProxy()
     cls.goodssearchproxy = GoodsSearchProxy()
     cls.proxy = GoodsDetailProxy()
     cls.driver.get("http://localhost")
Ejemplo n.º 3
0
 def setUpClass(cls):
     # 浏览器驱动
     cls.driver = DriverUtil.get_driver()
     cls.index_page = IndexProxy()
     cls.login_page = LoginProxy()
     logger.info("获取浏览器驱动对象:{}".format(cls.driver))
     logger.info("获取页面对象:{}".format((cls.index_page, cls.login_page)))
Ejemplo n.º 4
0
 def setUpClass(cls) -> None:
     cls.driver = DriverUtil.get_driver()  # 浏览器对象
     cls.index_proxy = IndexProxy()  # 首页业务执行对象
     cls.my_cart_proxy = MyCartProxy()  # 我的购物车业务执行对象
     cls.order_check_proxy = OrderCheckProxy()  # 订单确认业务执行对象
     cls.order_list_proxy = OrderListProxy()  # 订单列表业务执行对象
     cls.order_pay_proxy = OrderPayProxy()  # 订单支付业务执行对象
Ejemplo n.º 5
0
 def setUpClass(cls) -> None:
     cls.driver = DriverUtil.get_driver()  # 获取浏览器对象
     cls.index_proxy = IndexProxy()  # 首页业务执行对象
     cls.goods_cart_proxy = GoodsCartProxy()  # 购物车业务执行对象
     cls.order_check_proxy = OrderCheckProxy()  # 订单确认业务执行对象
     cls.my_order_proxy = MyOrderProxy()  # 我的订单业务执行对象
     cls.order_pay_proxy = OrderPayProxy()  # 订单支付业务执行对象
Ejemplo n.º 6
0
 def setUpClass(cls):
     cls.driver = DriverUtil.get_driver()  # 获取浏览器对象
     cls.index_proxy = IndexProxy()  # 首页页面业务执行对象
     cls.login_proxy = LoginProxy()
     cls.search_list_proxy = SearchListProxy()  # 搜索列表页面业务执行对象
     cls.goods_detail_proxy = GoodsDetailProxy()  # 商品详情页面业务执行对象
     cls.my_count_proxy = MyCountProxy()
Ejemplo n.º 7
0
class TestLogin(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        DriverUtil.get_driver()

    @classmethod
    def tearDownClass(cls):
        DriverUtil.quit_driver()

    def test_login(self):
        self.index_proxy = IndexProxy()
        self.login_proxy = LoginProxy()

        self.index_proxy.to_login_page()

        self.login_proxy.login("15711111112", "123456", "8888")
Ejemplo n.º 8
0
 def setUpClass(cls):
     # 获取浏览器驱动对象
     cls.driver = DriverUtil.get_driver()
     # 首页业务层对象
     cls.index_proxy = IndexProxy()
     # 登录页业务层对象
     cls.login_proxy = LoginProxy()
Ejemplo n.º 9
0
    def setUpClass(cls) -> None:
        cls.driver = DriverUtil.get_driver()  # 获取浏览器对象

        cls.index_proxy = IndexProxy()  # 首页业务操作对象
        cls.cart_proxy = CartProxy()  # 购物车业务操作对象
        cls.my_order_proxy = MyOrderProxy()  # 订单提交操作对象
        cls.my_order_list_proxy = MyOrderListProxy()  # 我的订单业务执行对象
        cls.order_pay_proxy = OrderPayProxy()  # 订单支付业务执行对象
Ejemplo n.º 10
0
 def setUpClass(cls):
     # 初始化浏览器
     cls.driver = DriverUtil.get_driver()
     cls.index_page = IndexProxy()
     cls.cart_page = CartProxy()
     cls.cart_order_page = CartOrderProxy()
     cls.order_list_page = OrderListProxy()
     cls.order_pay_page = OrderPayProxy()
Ejemplo n.º 11
0
class TestMpLogin:

    # pytest 类级别的初始化fixture
    def setup_class(self):
        # 定义浏览器驱动实例属性来存放自媒体的浏览器驱动对象
        self.driver = DriverUtils.get_mp_drvier()

        self.index_proxy = IndexProxy()

    # pytest 类级别的销毁fixture
    def teardown_class(self):
        DriverUtils.quit_mp_driver()
        IndexProxy()

    # 测试方法
    def test_indes_proxy(self):
        self.index_proxy.to_publish_aritcle_page()
Ejemplo n.º 12
0
 def setUpClass(cls):
     # 获取浏览器驱动对象
     cls.driver = DriverUtil.get_driver()
     # 获取用例页面
     cls.index_proxy = IndexProxy()
     cls.cart_proxy = CartProxy()
     cls.order_proxy = OrderProxy()
     cls.myorder_proxy = MyOrderProxy()
     cls.orderpay_proxy = OrderPayProxy()
Ejemplo n.º 13
0
 def setUpClass(cls) -> None:
     # 实例化驱动 对象
     cls.driver = DriverUtil.get_driver()
     # 实例化首页业务操作对象
     cls.index_proxy = IndexProxy()
     # 实例化商品搜索页对象
     cls.goods_proxy = GoodsProxy()
     # 实例化商品详情页对象
     cls.goods_detail_proxy = GoodsDetailProxy()
Ejemplo n.º 14
0
 def setUpClass(cls):
     # 获取浏览器驱动对象
     cls.driver = DriverUtil.get_driver()
     # 首页的业务层对象
     cls.index_proxy = IndexProxy()
     # 商品列表的业务层对象
     cls.goods_search_proxy = GoodsSearchProxy()
     # 商品详情页的业务层对象
     cls.goods_detail_proxy = GoodsDetailProxy()
Ejemplo n.º 15
0
    def setUpClass(cls):
        # 获取浏览器驱动对象
        cls.driver = DriverUtil.get_driver()
        # 页面对象 -- 业务层 首页 购物车 提交订单页
        cls.index_proxy = IndexProxy()
        cls.cart_proxy = CartProxy()
        cls.order_submit_proxy = OrderSubmitProxy()

        cls.my_order_proxy = MyOrderProxy()
        cls.order_pay_proxy = OrderPayProxy()
 def setUpClass(cls) -> None:
     cls.driver = DriverUtil.get_driver()
     cls.index_proxy = IndexProxy()  # 首页
     cls.login_proxy = LoginProxy()  # 登录页面
     cls.my_account_proxy = MyAccountProxy()  # 我的账户
     cls.cart_paroxy = CartProxy()  # 购物车
     cls.check_roder_proxy = CheckOrderProxy()  # 核对订单
     cls.payment_proxy = PaymentProxy()  # 订单支付页面
     cls.my_order_proxy = MyOrderProxy()  # 我的订单
     cls.payment_proxy = PaymentProxy()  # 订单支付
Ejemplo n.º 17
0
 def setUpClass(cls):
     cls.driver = DriverUtil.get_driver()  # 获取浏览器对象
     cls.index_proxy = IndexProxy()  # 首页页面业务执行对象
     cls.login_proxy = LoginProxy()
     cls.cart_proxy = CartProxy()  # 购物车页面业务执行对象
     cls.check_order_proxy = CheckOrderProxy()  # 订单确认页面业务执行对象
     cls.order_payment_proxy = OrderPaymentProxy()  # 订单支付页面执行对象
     cls.my_count_proxy = MyCountProxy()
     cls.my_order_proxy = MyOrderProxy()  # 我的订单页面业务执行对象
     cls.payment_success_proxy = PaymentSuccessProxy()
Ejemplo n.º 18
0
 def setUpClass(cls):
     cls.driver = DriverUtil.get_driver()  # 获取浏览器对象
     cls.good_detail_proxy = GoodsDeatilProxy()  #获取商品详情页面业务执行对象
     cls.search_list_proxy = SearchListProxy()  # 获取搜索列表界面业务执行对象
     cls.index_proxy = IndexProxy()  # 获取首页页面业务执行对象
Ejemplo n.º 19
0
 def setUpClass(cls) -> None:
     cls.driver = DriverUtil.get_driver()
     cls.index_proxy = IndexProxy()  # 首页业务层
     cls.search_list_proxy = SearchListProxy()  # 搜索列表业务层
     cls.good_detail_proxy = GoodDetailProxy()  # 商品详情页面业务层
Ejemplo n.º 20
0
    def setup_class(self):
        # 定义浏览器驱动实例属性来存放自媒体的浏览器驱动对象
        self.driver = DriverUtils.get_mp_drvier()

        self.index_proxy = IndexProxy()
Ejemplo n.º 21
0
    def setUpClass(cls):
        cls.driver = DriverUtil.get_driver()

        cls.index_proxy = IndexProxy()
        cls.cart_proxy = CartProxy()
        cls.order_proxy = OrderProxy()
Ejemplo n.º 22
0
    def setUpClass(cls) -> None:
        cls.driver = DriverUtil.get_driver()  # 获取浏览器对象

        cls.index_proxy = IndexProxy()  # 首页业务操作对象
        cls.goods_search_proxy = GoodsSearchProxy()  # 商品搜索业务操作对象
        cls.goods_detail_proxy = GoodsDetailProxy()  # 商品详情业务操作对象
Ejemplo n.º 23
0
 def teardown_class(self):
     DriverUtils.quit_mp_driver()
     IndexProxy()
Ejemplo n.º 24
0
 def setUpClass(cls):
     cls.driver = DriverUntil.get_driver()
     cls.index_proxy = IndexProxy()
     cls.goods_search_proxy = SearchProxy()
     cls.goods_detail_proxy = Goods_Detail_Proxy()
Ejemplo n.º 25
0
 def setUpClass(cls) -> None:
     cls.driver = DriverUtil.get_driver()  # 获取浏览器对象
     cls.index_proxy = IndexProxy()  # 首页页面业务执行对象
     cls.search_list_proxy = SearchListProxy()  # 搜索列表页面业务执行对象
     cls.goods_detail_proxy = GoodsDetailProxy()  # 商品详情页面业务执行对象
Ejemplo n.º 26
0
    def setUpClass(cls) -> None:
        cls.driver = DriverUtil.get_driver()  # 获取浏览器对象

        cls.index_proxy = IndexProxy()  # 首页业务操作对象
        cls.login_proxy = LoginProxy()  # 登录业务操作对象
Ejemplo n.º 27
0
 def setUpClass(cls):
     cls.driver = DriverUtil.get_driver()  # 获取浏览器对象
     cls.index_proxy = IndexProxy()  # 首页页面业务执行对象
     cls.login_proxy = LoginProxy()  # 登录页面业务执行对象
Ejemplo n.º 28
0
    def setUpClass(cls):
        cls.driver = DriverUtil.get_driver()

        cls.index_proxy = IndexProxy()
        cls.login_proxy = LoginProxy()
Ejemplo n.º 29
0
 def setUpClass(cls):
     cls.index_proxy = IndexProxy()
     cls.cart_proxy = CartProxy()
     cls.order_proxy = OrderProxy()
     cls.my_order_proxy = MyOrderProxy()
     cls.order_pay_proxy = OrderPayProxy()
Ejemplo n.º 30
0
 def setUpClass(cls) -> None:
     cls.driver = DriverUtil.get_driver()
     cls.index_proxy = IndexProxy()  # 首页
     cls.login_proxy = LoginProxy()  # 登录页面