コード例 #1
0
def test_mobile_cart():

    #driver = webdriver.Firefox()
    driver = commDisp.ssgWebDriver()
    driver.get('http://m.emart.ssg.com/sale/saleMain.ssg')

    commDispMobile.mobile_login(driver, logger)

    if process_item_list_page_open(driver, 'mobile'):
        pass
    else:
        driver.quit()
        return False

    driver.get('http://m.traders.ssg.com/main.ssg')
    if process_item_list_page_open(driver, 'mobile'):
        driver.quit()
        return True
    else:
        driver.quit()
        return False
コード例 #2
0
    driver.add_cookie(cookie1)
    driver.add_cookie(cookie2)
    driver.refresh()

    if process_item_list_page_open(driver, 'app'):
        driver.quit()
        return True
    else:
        driver.quit()
        return False


logger.info('>>> mobile cart test case start')
log_code = 'evnt.mobile.emart.cart'
if commDispMobile.test_loop_with_timeout(test_mobile_cart, 60, 3, logger):
    logger.info('mobile cart test case success')
else:
    logger.info('mobile cart test case fail.' + log_code + err_msg)
    driver = commDisp.ssgWebDriver()
    driver.get('http://www.ssg.com/uitest/insertMonitorControl.ssg?messageCode=' + log_code + '&addMessage=' + err_msg)
    driver.quit()
logger.info('------------------------')
logger.info('>>> mobile app cart test case start')
log_code = 'evnt.app.emart.cart'
if commDispMobile.test_loop_with_timeout(test_app_cart, 80, 3, logger):
    logger.info('mobile app cart test case success')
else:
    logger.info('mobile app cart test case fail.' + log_code + err_msg)
    driver = commDisp.ssgWebDriver()
    driver.get('http://www.ssg.com/uitest/insertMonitorControl.ssg?messageCode=' + log_code + '&addMessage=' + err_msg)
    driver.quit()