本文整理汇总了Python中pages.treeherder.TreeherderPage.select_next_job方法的典型用法代码示例。如果您正苦于以下问题:Python TreeherderPage.select_next_job方法的具体用法?Python TreeherderPage.select_next_job怎么用?Python TreeherderPage.select_next_job使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.treeherder.TreeherderPage
的用法示例。
在下文中一共展示了TreeherderPage.select_next_job方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_next_job_shortcut
# 需要导入模块: from pages.treeherder import TreeherderPage [as 别名]
# 或者: from pages.treeherder.TreeherderPage import select_next_job [as 别名]
def test_next_job_shortcut(base_url, selenium):
"""Open Treeherder, verify shortcut: 'Right Arrow' opens next job.
Open Treeherder page, select random job and get the keyword name, select next job
using Right Arrow shortcut, verify job keywords match."""
page = TreeherderPage(selenium, base_url).open()
all_jobs = page.all_jobs[:-1]
# Check number of jobs
random_index = random.randint(0, len(all_jobs))
jobs = all_jobs[random_index:(random_index + 2)]
# Select random job and job next to it
jobs[0].click()
assert jobs[0].selected
assert not jobs[1].selected
page.select_next_job()
assert jobs[1].selected
assert not jobs[0].selected