[okc] Initial message posting

This commit is contained in:
Roger Philibert 2012-03-22 02:32:47 +01:00 committed by Romain Bignon
commit 5b508ca340
3 changed files with 18 additions and 23 deletions

View file

@ -134,3 +134,10 @@ class PhotosPage(BasePage):
def get_photos(self):
imgs = self.parser.select(self.document.getroot(), "//div[@class='pic clearfix']//img", method='xpath')
return [img.get('src') for img in imgs]
class PostMessagePage(BasePage):
def post_mail(self, id, content):
self.browser.select_form(name='f2')
self.browser['r1'] = id
self.browser['body'] = content
self.browser.submit()