Reputation: 84
i am writing a code on python by using selenium that login into Facebook and Like a Facebook page i requested. it works to login but after opening the Facebook page i requested, it wont like the page it shows error saying 'Attribute-error: 'list' object has no attribute 'click''. maybe it didn't get the correct xpath ,any ideas?
Upvotes: 0
Views: 49
Reputation: 1556
See line 27 of your code: you are using find_elementS
instead of find_element
.
find_elements
always returns a list of elements, so when you are trying to do like.click()
, it fails. Try using find_element_by_xpath
at the line 27 of your code, it should work.
Good luck!
Upvotes: 1