Ejemplo n.º 1
0
def step_new_sharinglink(content):
    if '分享链接已生成' in SeleniumApi.step_text_cssselector(content,
                                                      '.modal-header'):
        assert True
    else:
        ExceptionCatch.catch_exception(content)
        assert False
Ejemplo n.º 2
0
def before_feature(content, feature):
    content.driver = webdriver.Chrome()
    content.driver.get(
        "https://*****:*****@top.tezign.com")
    content.driver.implicitly_wait(10)
    content.driver.maximize_window()
    time.sleep(1)
    SeleniumApi.step_send_keys(content, "//*[@placeholder='邮箱']",
                               '*****@*****.**')
    time.sleep(1)
    SeleniumApi.step_send_keys(content, "//*[@placeholder='密码']", '111111')
    SeleniumApi.step_click(content, "//*[@type='button']")
    if '特赞基地' == SeleniumApi.step_text_cssselector(content, ".side-header"):
        assert True
    else:
        ExceptionCatch.catch_exception(content)
        assert False
Ejemplo n.º 3
0
def step_check_shareing(content):
    sharing_url = SeleniumApi.step_text_cssselector(content, '.link-detail')
    time.sleep(2)
    SeleniumApi.step_switch_to_new_tab(content, sharing_url)
    time.sleep(5)
    if '免费咨询' in SeleniumApi.step_text_xpath(
            content, '//*[@id="rc-root"]/div/div[2]/div/div[1]/div[3]/button'):
        assert True
    else:
        ExceptionCatch.catch_exception(content)
    SeleniumApi.step_click(
        content,
        '//*[@id="rc-root"]/div/div[2]/div/div[3]/div[1]/div/div[1]/div[2]/div[1]'
    )
    time.sleep(3)
    if '平台出品' in SeleniumApi.step_text_xpath(
            content,
            '/html/body/div[4]/div/div[2]/div/div[1]/div/div[1]/div[2]/'
            'div[1]/div/span'):
        assert True
    else:
        ExceptionCatch.catch_exception(content)
    ExceptionCatch.catch_exception(content)
    SeleniumApi.step_switch_to_original_tab(content)
Ejemplo n.º 4
0
def step_forward_top(self):
    if '用户名' in SeleniumApi.step_text_cssselector(self, "hidden-sm"):
        assert True
    else:
        assert False
    SeleniumApi.step_quit(self)