accessing selenium web elements with python

前端 未结 2 1209
旧时难觅i
旧时难觅i 2020-12-17 16:21

I\'m sure this has been answered somewhere, because it\'s a very basic question - I can not, however, for the life of me, find the answer on the web. I feel like a complete

2条回答
  •  难免孤独
    2020-12-17 16:52

    I'm familiar with python's api of selenium but you probably can receive link using get_attribute(attributename) method. So it should be something like:

    linkstr = ""
    for link in Listlinker: 
      linkstr = link.get_attribute("href")
    
      if linkstr in Domenesider:
        pass
      elif str(HovedDomene) in linkstr:
        Domenesider.append(side)
    

提交回复
热议问题