just started with both python and selenium and i'm trying to make a script that logs into facebook, then searches for certain person and sends some message, but i have no idea how do i focus facebook's message div. tried both
browser.execute_script("document.querySelector('._1mf').click();")
and
searchBar = browser.find_element_by_class_name('_4po3')
but it seems like the right element loads after you click on the messagebox so i tried multiple different classnames and still i'm stucked :/
EDIT: just to be clear i managed to grab specific person from the chat bar by
searchBarAfterUpdate = browser.find_element_by_xpath(
"//div[@class = '_364g' and text() = 'personname']")
searchBarAfterUpdate.click()
and now when i have the chat box open i want to somehow write and send a message