示例#1
0
def test_tmall_50(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    support_button = tmall_main_page.find_support_button()
    action = webdriver.ActionChains(browser)
    action.move_to_element(support_button).perform()
    support_button_link = tmall_main_page.find_support_button_link()
    action.move_to_element(support_button_link).perform()
    time.sleep(1)
    support_button_link.click()
    time.sleep(11)
    questions = tmall_main_page.find_support_page_questions()
    assert 'Когда продавец отправит заказ?' and ' Как отследить мою посылку?' and 'Когда я получу свой заказ?' in questions
示例#2
0
def test_tmall_49(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    support_button = tmall_main_page.find_support_button()
    action = webdriver.ActionChains(browser)
    action.move_to_element(support_button).perform()
    support_button_link = tmall_main_page.find_support_button_link()
    action.move_to_element(support_button_link).perform()
    time.sleep(1)
    checking = False
    try:
        support_button_link.click()
        checking = True
    except:
        pass
    assert checking
示例#3
0
def test_tmall_51(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    support_button = tmall_main_page.find_support_button()
    action = webdriver.ActionChains(browser)
    action.move_to_element(support_button).perform()
    support_button_link = tmall_main_page.find_support_button_link()
    action.move_to_element(support_button_link).perform()
    time.sleep(1)
    support_button_link.click()
    time.sleep(11)
    return_button = tmall_main_page.find_support_page_return_button()
    browser.execute_script("arguments[0].scrollIntoView();", return_button)
    checking = False
    try:
        return_button.click()
        checking = True
    except:
        pass
    time.sleep(5)
    assert checking