我是python的新手。我想使用python硒在Jira中选择查询列表的第一项。
import selenium
chrome_path = "C:\Python37-32\chromedriver.exe"
from selenium import webdriver
driver = webdriver.Chrome(chrome_path)
driver.get('https://jira.xxxx.com/issues/?filter=24005')
driver.find_element_by_xpath('//*[@id="user-options"]/a').click()
driver.find_element_by_xpath('//*[@id="login-form-username"]').send_keys('xxxx')
driver.find_element_by_xpath('//*[@id="login-form-password"]').send_keys('xxxx')
driver.find_element_by_xpath('//*[@id="login-form-submit"]').click()
driver.find_element_by_xpath('//*@id="content"]/div[1]/div[3]/div/div/div/div/div/div/div[1]/div[1]/span/span[3]').text
需要选择查询列表中的每个条目。
请帮助
预先感谢
答案 0 :(得分:0)
如果可以的话,我建议您将Jira API用于类似的事情(您正在使用云)吗? https://jira.readthedocs.io/en/master/installation.html
您将使用过滤器https://domain.atlassian.net/issues/?filter=24005,并且此API请求中将出现所有问题。
示例:
from jira import JIRA
issue_list = jira.search_issues("filter=24005")
for issue in issue_list:
DO SOMETHING