Class: Vapir::Firefox::ModalDialogDocument
- Includes:
- ModalDialogContainer, PageContainer
- Defined in:
- lib/vapir-firefox/modal_dialog.rb
Overview
this represents a document contained within a modal dialog (a Firefox::ModalDialog) which was opened, generally, via a call to window.showModalDialog.
Instance Attribute Summary collapse
-
#browser_object ⇒ Object
readonly
Returns the value of attribute browser_object.
-
#containing_modal_dialog ⇒ Object
readonly
Returns the value of attribute containing_modal_dialog.
-
#jssh_socket ⇒ Object
readonly
Returns the value of attribute jssh_socket.
Instance Method Summary collapse
- #browser_window_object ⇒ Object
- #content_window_object ⇒ Object
- #document_object ⇒ Object
- #exists? ⇒ Boolean
-
#initialize(containing_modal_dialog, options = {}) ⇒ ModalDialogDocument
constructor
A new instance of ModalDialogDocument.
- #locate!(options = {}) ⇒ Object
- #wait(options = nil) ⇒ Object
Methods included from ModalDialogContainer
Methods included from PageContainer
#containing_object, #document_element, #execute_script, #html, #page_container, #text, #title, #url
Methods included from Container
#element_by_xpath, #element_object_by_xpath, #element_objects_by_xpath, #elements_by_xpath, #extra_for_contained
Constructor Details
#initialize(containing_modal_dialog, options = {}) ⇒ ModalDialogDocument
Returns a new instance of ModalDialogDocument.
108 109 110 111 112 113 114 |
# File 'lib/vapir-firefox/modal_dialog.rb', line 108 def initialize(containing_modal_dialog, ={}) =(, :timeout => ModalDialog::DEFAULT_TIMEOUT, :error => true) @jssh_socket=containing_modal_dialog.browser.jssh_socket @browser_object=containing_modal_dialog.modal_window.getBrowser @containing_modal_dialog=containing_modal_dialog end |
Instance Attribute Details
#browser_object ⇒ Object (readonly)
Returns the value of attribute browser_object.
116 117 118 |
# File 'lib/vapir-firefox/modal_dialog.rb', line 116 def browser_object @browser_object end |
#containing_modal_dialog ⇒ Object (readonly)
Returns the value of attribute containing_modal_dialog.
115 116 117 |
# File 'lib/vapir-firefox/modal_dialog.rb', line 115 def containing_modal_dialog @containing_modal_dialog end |
#jssh_socket ⇒ Object (readonly)
Returns the value of attribute jssh_socket.
142 143 144 |
# File 'lib/vapir-firefox/modal_dialog.rb', line 142 def jssh_socket @jssh_socket end |
Instance Method Details
#browser_window_object ⇒ Object
124 125 126 |
# File 'lib/vapir-firefox/modal_dialog.rb', line 124 def browser_window_object containing_modal_dialog.modal_window end |
#content_window_object ⇒ Object
121 122 123 |
# File 'lib/vapir-firefox/modal_dialog.rb', line 121 def content_window_object browser_object.contentWindow end |
#document_object ⇒ Object
118 119 120 |
# File 'lib/vapir-firefox/modal_dialog.rb', line 118 def document_object browser_object.contentDocument end |
#exists? ⇒ Boolean
131 132 133 134 |
# File 'lib/vapir-firefox/modal_dialog.rb', line 131 def exists? # todo/fix: will the document object change / become invalid / need to be relocated? @containing_modal_dialog.exists? && document_object end |