Class: Selenium::WebDriver::Support::AbstractEventListener

Inherits:
Object
  • Object
show all
Defined in:
lib/selenium/webdriver/support/abstract_event_listener.rb

Overview

Subclass and override methods from this class to implement your own event listener.

Examples:


class NavigationListener < Selenium::WebDriver::Support::AbstractEventListener
  def initialize(log)
    @log = log
  end

  def before_navigate_to(url, driver)
    @log.info "navigating to #{url}"
  end

  def after_navigate_to(url, driver)
    @log.info "done navigating to #{url}"
  end
end

listener = NavigationListener.new(logger)
driver = Selenium::WebDriver.for :firefox, :listener => listener

Instance Method Summary collapse

Instance Method Details

#after_change_value_of(element, driver) ⇒ Object



42
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 42

def after_change_value_of(element, driver) end

#after_click(element, driver) ⇒ Object



40
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 40

def after_click(element, driver) end

#after_close(driver) ⇒ Object



48
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 48

def after_close(driver) end

#after_execute_script(script, driver) ⇒ Object



44
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 44

def after_execute_script(script, driver) end

#after_find(by, what, driver) ⇒ Object



38
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 38

def after_find(by, what, driver) end

#after_navigate_back(driver) ⇒ Object



34
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 34

def after_navigate_back(driver) end

#after_navigate_forward(driver) ⇒ Object



36
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 36

def after_navigate_forward(driver) end

#after_navigate_to(url, driver) ⇒ Object



32
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 32

def after_navigate_to(url, driver) end

#after_quit(driver) ⇒ Object



46
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 46

def after_quit(driver) end

#before_change_value_of(element, driver) ⇒ Object



41
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 41

def before_change_value_of(element, driver) end

#before_click(element, driver) ⇒ Object



39
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 39

def before_click(element, driver) end

#before_close(driver) ⇒ Object



47
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 47

def before_close(driver) end

#before_execute_script(script, driver) ⇒ Object



43
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 43

def before_execute_script(script, driver) end

#before_find(by, what, driver) ⇒ Object



37
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 37

def before_find(by, what, driver) end

#before_navigate_back(driver) ⇒ Object



33
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 33

def before_navigate_back(driver) end

#before_navigate_forward(driver) ⇒ Object



35
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 35

def before_navigate_forward(driver) end

#before_navigate_to(url, driver) ⇒ Object



31
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 31

def before_navigate_to(url, driver) end

#before_quit(driver) ⇒ Object



45
# File 'lib/selenium/webdriver/support/abstract_event_listener.rb', line 45

def before_quit(driver) end