def commentInPost(self, postUrl, text):
"""Comment a text(str) in a post(str)"""
try:
self.get(postUrl)
tb = self.find_element_by_name("comment_text")
tb.send_keys(text)
tb.send_keys(Keys.ENTER)
return self.getScrenshotName(
"CommentingIn_" + self.title, screenshot, screenshotPath)
except Exception as e:
print("Can't comment in ", postUrl, "\n->", e)
评论列表
文章目录