Class: Async::WebDriver::Bridge::Pool::CachedWrapper

Inherits:
Session
  • Object
show all
Defined in:
lib/async/webdriver/bridge/pool.rb

Overview

A pooled session wrapper that returns sessions to the cache on close.

Constant Summary

Constants included from RequestHelper

RequestHelper::CONTENT_TYPE, RequestHelper::ELEMENT_KEY, RequestHelper::GET_HEADERS, RequestHelper::POST_HEADERS

Instance Attribute Summary

Attributes inherited from Session

#The session identifier., #The underlying HTTP client (or wrapper)., #capabilities, #delegate, #id

Instance Method Summary collapse

Methods inherited from Session

#The capabilities of the session.=, #current_scope, #execute, #execute_async, #initialize, #inspect, open, #request_path, #reset!, #session

Methods included from Scope::Window

#fullscreen_window, #maximize_window, #minimize_window, #resize_window, #set_window_rect, #window_rect

Methods included from Scope::Timeouts

#implicit_wait_timeout, #implicit_wait_timeout=, #page_load_timeout, #page_load_timeout=, #script_timeout, #script_timeout=, #timeouts

Methods included from Scope::ScreenCapture

#screenshot

Methods included from Scope::Printing

#print

Methods included from Scope::Navigation

#current_path, #current_url, #navigate_back, #navigate_forward, #navigate_to, #refresh, #wait_for_navigation

Methods included from Scope::Frames

#switch_to_frame, #switch_to_parent_frame

Methods included from Scope::Fields

#check, #click_button, #fill_in, #find_field

Methods included from Scope::Elements

#children, #find_element, #find_element_by_css, #find_element_by_link_text, #find_element_by_partial_link_text, #find_element_by_tag_name, #find_element_by_xpath, #find_elements, #find_elements_by_css, #find_elements_by_link_text, #find_elements_by_partial_link_text, #find_elements_by_tag_name, #find_elements_by_xpath

Methods included from Scope::Document

#document_source, #document_title

Methods included from Scope::Cookies

#add_cookie, #cookie, #cookies, #delete_all_cookies, #delete_cookie

Methods included from Scope::Alerts

#accept_alert, #alert_text, #dismiss_alert, #set_alert_text

Methods included from RequestHelper

#delete, #extract_value, #get, #post, #request_path, #unwrap_object, #unwrap_objects

Constructor Details

This class inherits a constructor from Async::WebDriver::Session

Instance Method Details

#closeObject

Return the session to the pool when possible.



175
176
177
178
179
# File 'lib/async/webdriver/bridge/pool.rb', line 175

def close
	unless self.pool.reuse(self)
		super
	end
end

#payloadObject



170
171
172
# File 'lib/async/webdriver/bridge/pool.rb', line 170

def payload
	@options[:payload]
end

#poolObject



165
166
167
# File 'lib/async/webdriver/bridge/pool.rb', line 165

def pool
	@options[:pool]
end