Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/widgetastic/widget/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ def __get__(self, obj, type=None):
args, kwargs = process_parameters(obj, self.args, kwargs)
if issubclass(self.klass, ParametrizedView):
# Shortcut, don't cache as the ParametrizedViewRequest is not the widget yet
return ParametrizedViewRequest(obj, self.klass, *args, **kwargs)
req = ParametrizedViewRequest(obj, self.klass, *args, **kwargs)
obj.child_widget_accessed(req)
return req
else:
o = self.klass(obj, *args, **kwargs)
o.parent_descriptor = self
Expand Down Expand Up @@ -521,7 +523,7 @@ def child_widget_accessed(self, widget):
Useful when eg. the containing widget needs to open for the child widget to become visible.

Args:
widget: The widget being accessed.
widget: The widget being accessed or :py:class:`ParametrizedViewRequest`.
"""
pass

Expand Down Expand Up @@ -1034,7 +1036,7 @@ def child_widget_accessed(self, widget):
One of useful examples is below. it allows us to switch between frames.

Args:
widget: The widget being accessed.
widget: The widget being accessed or :py:class:`ParametrizedViewRequest`.
"""
self.browser.switch_to_main_frame()
parents = [p for p in self.hierarchy if getattr(p, 'FRAME', None)]
Expand Down