Fixed to use the title "(null)" when the page does not have any title.
This commit is contained in:
parent
57a72a7120
commit
c4fc5c0c43
@ -103,7 +103,8 @@ class CommandDispatcher:
|
|||||||
|
|
||||||
def _current_title(self):
|
def _current_title(self):
|
||||||
"""Convenience method to get the current title."""
|
"""Convenience method to get the current title."""
|
||||||
return self._tabbed_browser.page_title(self._current_index())
|
title = self._current_widget().title()
|
||||||
|
return title if title else "(null)"
|
||||||
|
|
||||||
def _current_widget(self):
|
def _current_widget(self):
|
||||||
"""Get the currently active widget from a command."""
|
"""Get the currently active widget from a command."""
|
||||||
|
Loading…
Reference in New Issue
Block a user