Python Forum
How to click facebook message button
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to click facebook message button
#1
Tried these lines, but did not work. Need help

from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait as W
from selenium.webdriver.support import expected_conditions as E
from selenium.webdriver.common.keys import Keys
from time import sleep    
import pandas as pd
import re

driver.find_element_by_xpath("//a[@id='u_ps_fetchstream_3_1_5']").click())
driver.find_element_by_link_text('Message')
Reply
#2
You're going to need to give more details. What exactly does "did not work" mean? What's happening and what are you expecting to happen? What exactly is your end goal?
Reply
#3
You're missing a lot of setup code,
you have to:
  • Start browser
  • fetch url
  • your code goes here
  • close browser
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  cant click button by script at page michael1834 1 1,045 Dec-08-2023, 04:44 PM
Last Post: SpongeB0B
  Automating Facebook Posts mieciow 2 1,362 Aug-07-2023, 12:34 PM
Last Post: Gaurav_Kumar
  Click on a button on web page using Selenium Pavel_47 7 4,667 Jan-05-2023, 04:20 AM
Last Post: ellapurnellrt
  button click error rafarangel 2 3,111 Feb-11-2021, 08:19 PM
Last Post: buran
  Web scrapping login facebook credentials kosmas9 0 1,934 Aug-17-2020, 01:33 PM
Last Post: kosmas9
  Log In Button Won't Click - Python Selenium Webdriver samlee916 2 3,812 Jun-07-2020, 04:42 PM
Last Post: samlee916
  Contact form button click action Man_from_India 1 2,784 Feb-01-2020, 06:21 PM
Last Post: snippsat
  HOWTO? Login DSL Modem with Python Requests: need Click "Apply" Button Webtest 4 8,463 Aug-20-2019, 04:03 PM
Last Post: johnmina
  Selenium click on popup button??? GuJu 7 7,852 Jul-20-2019, 09:21 AM
Last Post: Nizam
  How to trigger click event on Button without ID/Name gahhon 7 13,945 Feb-10-2019, 03:06 PM
Last Post: gahhon

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020