from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
table = WebDriverWait(driver, 50).until(EC.visibility_of_element_located((By.XPATH, "//div[@class='table-wrap']/table[1]")))
element.click()
for row in table.find_elements_by_xpath(".//tr//td[@class='confluenceTd']/div[1]"):
cell_name=row.find_element_by_xpath("./p[1]")
print(cell_name.text)
image= row.find_element_by_xpath(".//span//img")
您可以使用下面的代码迭代表中的所有行,并从每一行访问单元格名称和图像
相关问题 更多 >
编程相关推荐