Commits

Brendan McCollam committed 573eaef

Adding timeout support for back() and forward()

  • Participants
  • Parent commits bbc2b66

Comments (0)

Files changed (2)

File punky/__init__.py

     PunkyTimeout,
 )
 
-__version__ = '0.3.3'
+__version__ = '0.3.4'

File punky/browster.py

 
 
 SUPPORTED_STRING_INPUT_TYPES = ('text',
+                                'hidden',
                                 'password',
                                 'datetime',
                                 'datetime-local',
         if self.webpage:
             del self.webpage
 
-    def back(self):
+    def back(self, timeout=None):
         """Navigate back, equivalent to using a browser 'back' button."""
         self.webpage.triggerAction(QWebPage.Back)
+        return self._wait_load(timeout)
 
-    def forward(self):
+    def forward(self, timeout=None):
         """Navigate forward, equivalent to using a browser 'forward' button."""
         self.webpage.triggerAction(QWebPage.Forward)
+        return self._wait_load(timeout)
 
     #{ Webview