how to get an attribute value from a href link in selenium

后端 未结 3 1326
余生分开走
余生分开走 2021-01-11 19:21

i am trying to get the link from \"a href\" attribute



        
3条回答
  •  悲&欢浪女
    2021-01-11 19:38

    You need to call GetAttribute() with actual attribute name. Replace:

    lists1[0].GetAttribute("a href");
    

    with:

    lists1[0].GetAttribute("href");
    

提交回复
热议问题