def process(self,caption_text):
time.sleep(1)
caption_text
#self.driver.get("https://www.facebook.com")
actions = ActionChains(self.driver)
time.sleep(2)
actions.send_keys('p').perform()
time.sleep(1)
caption = ActionChains(self.driver)
caption.send_keys(caption_text).perform()
click_post = self.driver.find_element_by_xpath('//div[2]/div[3]/div/div[2]/div/button')
click_post.click()
print "Successfully posted "
self.driver.close()
#text = raw_input("Enter text to be posted - ")
评论列表
文章目录