def switch_to_jd_sku_comments_page(browser: Chrome, sku_url: str):
    open_second_window(browser)
    print('------打开新窗口并正在加载当前SKU默认评论页面------')
    browser.get(sku_url + '#comment')
    browser.execute_script('document.getElementById("comm-curr-sku").click()')
    print('------当前SKU默认评论页面加载完成------')
    waiting_content_loading(browser, 'comment-item')
def switch_to_sn_default_comments_page(browser: Chrome, shop_url: str):
    open_second_window(browser)
    print('------打开新窗口并正在加载默认评论页面------')
    browser.get(shop_url + '#productCommTitle')
    browser.execute_script('document.querySelector("#productCommTitle > a:nth-child(1)").click()')
    print('------默认评论页面加载完成------')
    waiting_content_loading(browser, 'rv-target-item')
def switch_to_jd_default_comments_page(browser: Chrome, shop_url: str):
    open_second_window(browser)
    print('------打开新窗口并正在加载默认评论页面------')
    browser.get(shop_url + '#comment')
    print('------默认评论页面加载完成------')
    waiting_content_loading(browser, 'comment-item')
Exemplo n.º 4
0
def switch_to_current_sku_page(browser: Chrome, sku_url: str):
    open_second_window(browser)
    print(f'------打开新窗口并正在加载当前商品页面: {sku_url}------')
    browser.get(sku_url)
    print('------当前商品页面加载完成------')
    sleep(2)