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



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

def after_change_value_of(element, driver) end

#after_click(element, driver) ⇒ Object



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

def after_click(element, driver) end

#after_close(driver) ⇒ Object



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

def after_close(driver) end

#after_execute_script(script, driver) ⇒ Object



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

def after_execute_script(script, driver) end

#after_find(by, what, driver) ⇒ Object



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

def after_find(by, what, driver) end

#after_navigate_back(driver) ⇒ Object



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

def after_navigate_back(driver) end

#after_navigate_forward(driver) ⇒ Object



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

def after_navigate_forward(driver) end

#after_navigate_to(url, driver) ⇒ Object



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

def after_navigate_to(url, driver) end

#after_quit(driver) ⇒ Object



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

def after_quit(driver) end

#before_change_value_of(element, driver) ⇒ Object



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

def before_change_value_of(element, driver) end

#before_click(element, driver) ⇒ Object



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

def before_click(element, driver) end

#before_close(driver) ⇒ Object



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

def before_close(driver) end

#before_execute_script(script, driver) ⇒ Object



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

def before_execute_script(script, driver) end

#before_find(by, what, driver) ⇒ Object



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

def before_find(by, what, driver) end

#before_navigate_back(driver) ⇒ Object



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

def before_navigate_back(driver) end

#before_navigate_forward(driver) ⇒ Object



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

def before_navigate_forward(driver) end

#before_navigate_to(url, driver) ⇒ Object



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

def before_navigate_to(url, driver) end

#before_quit(driver) ⇒ Object



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

def before_quit(driver) end