def wait_for_dip_in_transfer_backlog(self, dip_uuid):
"""Wait for the DIP with UUID ``dip_uuid`` to appear in the Backlog tab.
"""
max_seconds = 120
seconds = 0
while True:
self.navigate(self.get_transfer_backlog_url(), reload=True)
self.driver.find_element_by_css_selector(
'input[title="search query"]').send_keys(dip_uuid)
Select(self.driver.find_element_by_css_selector(
'select[title="field name"]')).select_by_visible_text(
'SIP UUID')
Select(self.driver.find_element_by_css_selector(
'select[title="query type"]')).select_by_visible_text(
'Phrase')
self.driver.find_element_by_id('search_submit').click()
summary_el = self.driver.find_element_by_id('backlog-entries_info')
if 'Showing 0 to 0 of 0 entries' == summary_el.text.strip():
seconds += 1
if seconds > max_seconds:
break
time.sleep(1)
else:
time.sleep(1) # Sleep a little longer, for good measure
break
archivematicaselenium.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录