python selenium 获取xlink元素内容

for link in driver.find_elements_by_css_selector("tr:nth-child(1) > td.taskStatus use"):
    assert_status = link.get_attribute('xlink:href')
   print(assert_sttus)
# 打印出的值为‘#icon-taskStatus-executing’ 

posted @ 2021-06-07 13:39  test_yu  阅读(331)  评论(0编辑  收藏  举报