Class: Screengem::ScreenElement

Inherits:
Object
  • Object
show all
Includes:
Capybara::DSL, RailsRoutes
Defined in:
lib/screengem/screen_element.rb

Overview

Base class for all screen elements.

Calling visit does nothing when currently navigated to the target.

Instance Method Summary collapse

Methods included from RailsRoutes

#routes

Instance Method Details

#visit(visit_uri = visit_path) ⇒ Object



11
12
13
14
15
# File 'lib/screengem/screen_element.rb', line 11

def visit(visit_uri = visit_path)
  return if visit_uri == current_uri

  page.visit(visit_uri)
end

#visit_pathObject

Subclasses override the visit_path method to participate in auto visit. See Screengem::AutomaticVisit.



21
22
# File 'lib/screengem/screen_element.rb', line 21

def visit_path
end