def test_app_cart():
    driver = commDispMobile.ssgAppWebDriver()
    #fp = webdriver.FirefoxProfile()
    #fp.set_preference("general.useragent.override", "SSG_APP")
    #driver = webdriver.Firefox(fp)
    driver.get('http://m.emart.ssg.com/sale/saleMain.ssg')

    cookie1 = {'name': 'MOBIL_APP_NO', 'value': '1'}
    cookie2 = {'name': 'APP_INF', 'value': 'N%7CHH_FS'}
    driver.add_cookie(cookie1)
    driver.add_cookie(cookie2)
    driver.refresh()

    commDispMobile.mobile_login(driver, logger)

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

    driver.get('http://m.traders.ssg.com/main.ssg')
    cookie1 = {'name': 'MOBIL_APP_NO', 'value': '1'}
    cookie2 = {'name': 'APP_INF', 'value': 'N%7CHH_FS'}
    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
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