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



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

def after_change_value_of(element, driver) end

#after_click(element, driver) ⇒ Object



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

def after_click(element, driver) end

#after_close(driver) ⇒ Object



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

def after_close(driver) end

#after_execute_script(script, driver) ⇒ Object



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

def after_execute_script(script, driver) end

#after_find(by, what, driver) ⇒ Object



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

def after_find(by, what, driver) end

#after_navigate_back(driver) ⇒ Object



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

def after_navigate_back(driver) end

#after_navigate_forward(driver) ⇒ Object



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

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



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

def after_quit(driver) end

#before_change_value_of(element, driver) ⇒ Object



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

def before_change_value_of(element, driver) end

#before_click(element, driver) ⇒ Object



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

def before_click(element, driver) end

#before_close(driver) ⇒ Object



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

def before_close(driver) end

#before_execute_script(script, driver) ⇒ Object



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

def before_execute_script(script, driver) end

#before_find(by, what, driver) ⇒ Object



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

def before_find(by, what, driver) end

#before_navigate_back(driver) ⇒ Object



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

def before_navigate_back(driver) end

#before_navigate_forward(driver) ⇒ Object



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

def before_navigate_forward(driver) end

#before_navigate_to(url, driver) ⇒ Object



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

def before_navigate_to(url, driver) end

#before_quit(driver) ⇒ Object



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

def before_quit(driver) end