implement StatusField in sfr backend

This commit is contained in:
Christophe Benz 2010-11-20 19:00:45 +01:00 committed by Romain Bignon
commit b24b40ac98
4 changed files with 34 additions and 3 deletions

View file

@ -37,6 +37,11 @@ class SfrBrowser(BaseBrowser):
'http://www.sfr.fr/xmscomposer/mc/envoyer-texto-mms/send.html': SentPage,
}
def get_nb_remaining_free_sms(self):
if not self.is_on_page(ComposePage):
self.home()
return self.page.get_nb_remaining_free_sms()
def home(self):
self.location('http://www.sfr.fr/xmscomposer/index.html?todo=compose')
@ -52,7 +57,7 @@ class SfrBrowser(BaseBrowser):
def post_message(self, message):
if not self.is_on_page(ComposePage):
self.location('http://www.sfr.fr/xmscomposer/index.html\?todo=compose')
self.home()
self.page.post_message(message)
if self.is_on_page(ConfirmPage):
self.page.confirm()