Example #1
0
def test_tmall_47(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Кулер для процессора")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    if add != None:
        add.click()
    elements = tmall_main_page.find_item_brand_choice()[3].text
    assert "92x92x25 мм" and "120x120x25 мм" in elements
Example #2
0
def test_tmall_48(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Процессоры Intel")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    if add != None:
        add.click()
    items = tmall_main_page.find_item_quantity()
    assert len(items) > 7
Example #3
0
def test_tmall_45(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Кулер для процессора")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    if add != None:
        add.click()
    elements = tmall_main_page.find_item_brand_choice()[1].text
    assert "Теплопроводящая штукатурка" and "Водяное охлаждение" in elements
Example #4
0
def test_tmall_46(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Кулер для процессора")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    if add != None:
        add.click()
    elements = tmall_main_page.find_item_brand_choice()[2].text
    assert "Другое" and "Пластик" and "Медь" in elements
Example #5
0
def test_tmall_13(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Робот пылесос")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    if add != None:
        add.click()
        assert True
    else:
        assert False
Example #6
0
def test_tmall_44(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Видеокарта gtx 1650")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    if add != None:
        add.click()
    brand_choice = tmall_main_page.find_item_brand_choice()[0]
    if brand_choice != None:
        assert True
    else:
        assert False
Example #7
0
def test_tmall_23(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Куртки")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    if add != None:
        add.click()
    item_company = tmall_main_page.find_item_company()
    if item_company.text != None:
        assert True
    else:
        assert False
Example #8
0
def test_tmall_21(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Перчатки")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    if add != None:
        add.click()
    item_image = tmall_main_page.find_item_image()
    if item_image != None:
        assert True
    else:
        assert False
Example #9
0
def test_tmall_19(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Аккумулятор")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    if add != None:
        add.click()
    item_price = tmall_main_page.find_item_price()
    if item_price.text != None:
        assert True
    else:
        assert False
Example #10
0
def test_tmall_43(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Видеокарта gtx 1650")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    if add != None:
        add.click()
    item_price = tmall_main_page.find_item_price()
    index = item_price.text.find(',')
    if int(item_price.text[:index].replace(' ', '')) > 10000:
        assert True
    else:
        assert False
Example #11
0
def test_tmall_16(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Аккумулятор")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    if add != None:
        add.click()
    check_first_button = False
    try:
        tmall_main_page.find_price_button().click()
        check_first_button = True
    except:
        pass
    assert check_first_button
Example #12
0
def test_tmall_14(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Мультиварка")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    if add != None:
        add.click()
    check_first_button = False
    try:
        tmall_main_page.find_by_orders_button().click()
        check_first_button = True
    except:
        pass
    assert check_first_button
Example #13
0
def test_tmall_17(browser):
    tmall_main_page = SearchHelper(browser)
    tmall_main_page.go_to_site()
    tmall_main_page.enter_word("Сковородка")
    tmall_main_page.find_search_button().click()
    time.sleep(5)
    add = tmall_main_page.find_advertisement()
    checking = False
    if add != None:
        add.click()
    item_link = tmall_main_page.find_item_link()
    try:
        item_link.click()
        checking = True
    except:
        pass
    assert checking