0
Facebookはページへの投稿を処理しますが、あなたは個人ページやグループではなく、管理者です(管理者はテキストエリアがあります)。 Facebookがボタンとして扱っていると思うテキストボックスを選択できますが、テキストを送信することはできません。私がしようとしたとき、私はこのエラーが表示されます。「selenium.common.exceptions.WebDriverException:メッセージ:不明なエラー:要素を集中することはできません」セレンのテキストボックスに入力できないのは、選択のみです。テキストエリアの要素がありません
driver.get("https://www.facebook.com/libertyempireband/")
sleep(8)
post_box=driver.find_element_by_xpath('//*[@id="rc.u_0_22"]/div/div[1]/div/div[2]/div/div[1]')
#selects text box which I think is a button
post_box.click()
sleep(5)
poster_box=driver.find_element_by_xpath('//*[@id="rc.u_0_22"]')
#attempts to type in textbox, but recieve a "can't focus element" error
poster_box.send_keys("hey")