本文整理汇总了Python中selenium.webdriver.support.ui.WebDriverWait.find_elements_by_id方法的典型用法代码示例。如果您正苦于以下问题:Python WebDriverWait.find_elements_by_id方法的具体用法?Python WebDriverWait.find_elements_by_id怎么用?Python WebDriverWait.find_elements_by_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类selenium.webdriver.support.ui.WebDriverWait
的用法示例。
在下文中一共展示了WebDriverWait.find_elements_by_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: WebDriverWait
# 需要导入模块: from selenium.webdriver.support.ui import WebDriverWait [as 别名]
# 或者: from selenium.webdriver.support.ui.WebDriverWait import find_elements_by_id [as 别名]
botao = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "server_select_list")))
driver.execute_script("return Index.submit_login('server_br56');")
saque = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.CLASS_NAME, "manager_icon")))
saque.click()
farm_table = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "am_widget_Farm")))
uri = driver.current_url+"&Farm_page="
abas = len(farm_table.find_elements_by_class_name("paged-nav-item"))+1
inf=1
rec_farm=0
total_farm=0
while inf==1:
doFarm.count = 0
for i in range(0,abas):
driver.get(uri+`i`)
farm_table = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "am_widget_Farm")))
if (len(farm_table.find_elements_by_id("bot_check_form"))>0) :
exit()
result = doFarm()
if result is False:
break
print "Enviados ", doFarm.count, " ataques"
#driver.get("http://br56.tribalwars.com.br/game.php?village=33110&screen=info_player")
#WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "stats")))
#novo_farm = driver.execute_script("return StatsWidget.stats.looted_res")
#print "Farm do dia ", novo_farm[0][1]
#driver.get("http://br56.tribalwars.com.br/game.php?village=33110&screen=overview")
wait()