コード例 #1
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
コード例 #2
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