module Capybara::UI::WidgetParts::Container

Attributes

widget_lookup_scope[W]

Public Instance Methods

has_widget?(name, *args) click to toggle source
# File lib/capybara/ui/widgets/parts/container.rb, line 7
def has_widget?(name, *args)
  deprecate('has_widget? and its alias widget?', 'visible?')
  widget_class(name).present_in?(self, *args)
end
Also aliased as: widget?
not_visible?(name, *args) click to toggle source
# File lib/capybara/ui/widgets/parts/container.rb, line 18
def not_visible?(name, *args)
  widget_class(name).not_present_in?(self, *args)
end
visible?(name, *args) click to toggle source
# File lib/capybara/ui/widgets/parts/container.rb, line 14
def visible?(name, *args)
  widget_class(name).present_in?(self, *args)
end
widget(name, *args) click to toggle source
# File lib/capybara/ui/widgets/parts/container.rb, line 22
def widget(name, *args)
  first, rest = [*name, *args]

  widget_class(first).find_in(self, *rest)
end
widget?(name, *args)
Alias for: has_widget?
widgets(name, *args) click to toggle source
# File lib/capybara/ui/widgets/parts/container.rb, line 28
def widgets(name, *args)
  first, rest = [*name, *args]

  widget_class(first).find_all_in(self, *rest)
end

Private Instance Methods

widget_class(name) click to toggle source
# File lib/capybara/ui/widgets/parts/container.rb, line 38
def widget_class(name)
  WidgetName.new(name).to_class(widget_lookup_scope)
end
widget_lookup_scope() click to toggle source
# File lib/capybara/ui/widgets/parts/container.rb, line 42
def widget_lookup_scope
  @widget_lookup_scope || self.class
end