I tried the script below but it doesn't work, I can't find any HTML at the "Add friend" button. Button . Is there any way to press that button? Thank you
from selenium import webdriver
import time
driver = selenium.webdriver.Firefox()
driver.get("http://www.facebook.com")
time.sleep(5)
driver.find_elements_by_link_text("Add Friend").click()
It shows :
driver.find_elements_by_link_text("Add Friend").click()
AttributeError: 'list' object has no attribute 'click'
.find_elements_by_link_text()returns alist. Why do you expect calling.click()on it to do anything or more specifically what would you expect it to do?