def main(): driver=webdriver.Chrome() a=LoginPage(driver) pd=PreSaleDetailPage(driver) a.open() a.input_username('*****@*****.**') a.input_password('123456') a.click_submit() a.login_wait_check() pd.enter_coupon_menu() pd.enter_pre_sale() # pd.create_presale('新的一天','卡百利江浙沪包邮','0.01','0.98',3,False,5) # pd.sleep(100) pd.click_create_presale_button() pd.input_presale_name('up') pd.input_presale_time() pd.select_goods('黑森林') pd.input_deposit('0.01') pd.input_deposit_amount('0.98') pd.click_full_payment_yes_button() pd.input_limit_count(5) pd.input_user_participation_limit(3) pd.click_save() pd.sleep(100)
def setUpClass(cls): cls.driver = webdriver.Chrome() login_page = LoginPage(cls.driver) cls.order_page = OrderPage(cls.driver) login_page.open() login_page.input_username('*****@*****.**') login_page.input_password('123456') login_page.click_submit() login_page.login_wait_check()
def main(): driver=webdriver.Chrome() a=LoginPage(driver) fd=FlashDetailPage(driver) a.open() a.input_username('*****@*****.**') a.input_password('123456') a.click_submit() a.login_wait_check() fd.enter_coupon() fd.enter_flash_menu() fd.click_create_flash_button() fd.create_flash('test','闪购-无sku商品')