Click button by find_element_by_class_name not working python selenium webdriver NOT working

后端 未结 2 1091
故里飘歌
故里飘歌 2020-12-18 05:50

I\'m trying to add contacts on LinkedIn using Python and Selenium. I\'m attempting to do so by adding the contact suggestions made by LinkedIn in the \"Network\" tab (https:

2条回答
  •  独厮守ぢ
    2020-12-18 06:07

    You should use find_elements for finding all elements with same class Try this to get all elements:

    elements = driver.find_elements_by_class_name("mn-person-card__person-btn-ext.button-secondary-medium")
    

    then use a for loop to click each of them. For example:

    for e in elements:
        e.click()
    

提交回复
热议问题