vapir-firefox 1.7.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ module Vapir
2
+ class Firefox
3
+ VERSION = '1.7.0.rc1'
4
+ end
5
+ end
@@ -0,0 +1,38 @@
1
+ module Vapir
2
+ # this contains methods for an object that represnts a thing that has its own window.
3
+ # that includes a Browser and a ModalDialog.
4
+ # this assumes that #browser_window_object is defined on the includer.
5
+ module Firefox::Window
6
+ # returns the hWnd of this window.
7
+ # (MS Windows-only)
8
+ def hwnd
9
+ win_window.hwnd
10
+ end
11
+ # returns an instance of WinWindow representing this window.
12
+ # (MS Windows only)
13
+ def win_window
14
+ require 'vapir-common/win_window'
15
+ @win_window||=begin
16
+ orig_browser_window_title=browser_window_object.document.title
17
+ browser_window_object.document.title=orig_browser_window_title+(rand(36**16).to_s(36))
18
+ begin
19
+ candidates=::Waiter.try_for(2, :condition => proc{|ret| ret.size > 0}, :exception => nil) do
20
+ WinWindow::All.select do |win|
21
+ [mozilla_window_class_name].include?(win.class_name) && win.text==browser_window_object.document.title
22
+ end
23
+ end
24
+ unless candidates.size==1
25
+ raise ::WinWindow::MatchError, "Found #{candidates.size} Mozilla windows titled #{browser_window_object.document.title}"
26
+ end
27
+ candidates.first
28
+ ensure
29
+ browser_window_object.document.title=orig_browser_window_title
30
+ end
31
+ end
32
+ end
33
+ # sets this window as the foreground window (MS Windows only)
34
+ def bring_to_front
35
+ win_window.set_foreground!
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,15 @@
1
+ require 'vapir-common'
2
+
3
+ # create stub class since everything is defined in Vapir::Firefox namespace - this needs to be defined before the real class.
4
+ require 'vapir-common/browser'
5
+ module Vapir
6
+ Firefox = Class.new(Vapir::Browser)
7
+ end
8
+
9
+ require 'vapir-firefox/firefox'
10
+ require 'vapir-firefox/elements'
11
+ require 'vapir-firefox/version'
12
+
13
+ # this only has an effect if firewatir is required before anyone invokes
14
+ # Browser.new. Thus it has no effect when Browser.new itself autoloads this library.
15
+ Vapir::Browser.default = 'firefox'
metadata ADDED
@@ -0,0 +1,120 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vapir-firefox
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.7.0.rc1
5
+ platform: ruby
6
+ authors:
7
+ - Ethan
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-04-30 00:00:00 -04:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: vapir-common
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - "="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.7.0.rc1
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: json
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: activesupport
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ description: " Vapir-Firefox is a library to programatically drive the Firefox\n browser over the JSSH Firefox extension, exposing a simple-to-use \n and powerful API to make automated testing a simple and joyous affair. \n Forked from the Watir library. \n"
46
+ email: vapir@googlegroups.com
47
+ executables: []
48
+
49
+ extensions: []
50
+
51
+ extra_rdoc_files: []
52
+
53
+ files:
54
+ - LICENSE.txt
55
+ - History.txt
56
+ - README.txt
57
+ - lib/vapir-firefox.rb
58
+ - lib/vapir/firefox.rb
59
+ - lib/vapir/ff.rb
60
+ - lib/vapir-firefox/version.rb
61
+ - lib/vapir-firefox/firefox.rb
62
+ - lib/vapir-firefox/container.rb
63
+ - lib/vapir-firefox/page_container.rb
64
+ - lib/vapir-firefox/window.rb
65
+ - lib/vapir-firefox/modal_dialog.rb
66
+ - lib/vapir-firefox/element.rb
67
+ - lib/vapir-firefox/elements/button.rb
68
+ - lib/vapir-firefox/elements/file_field.rb
69
+ - lib/vapir-firefox/elements/form.rb
70
+ - lib/vapir-firefox/elements/frame.rb
71
+ - lib/vapir-firefox/elements/hidden.rb
72
+ - lib/vapir-firefox/elements/image.rb
73
+ - lib/vapir-firefox/elements/input_element.rb
74
+ - lib/vapir-firefox/elements/link.rb
75
+ - lib/vapir-firefox/elements/non_control_elements.rb
76
+ - lib/vapir-firefox/elements/option.rb
77
+ - lib/vapir-firefox/elements/radio_check_common.rb
78
+ - lib/vapir-firefox/elements/select_list.rb
79
+ - lib/vapir-firefox/elements/table.rb
80
+ - lib/vapir-firefox/elements/table_cell.rb
81
+ - lib/vapir-firefox/elements/table_row.rb
82
+ - lib/vapir-firefox/elements/text_field.rb
83
+ - lib/vapir-firefox/elements.rb
84
+ - lib/vapir-firefox/jssh_socket.rb
85
+ - lib/vapir-firefox/prototype.functional.js
86
+ has_rdoc: true
87
+ homepage: http://www.vapir.org/
88
+ licenses: []
89
+
90
+ post_install_message:
91
+ rdoc_options:
92
+ - --title
93
+ - Vapir-Firefox
94
+ - --accessor
95
+ - dom_attr=R
96
+ - --main
97
+ - Vapir::Firefox
98
+ require_paths:
99
+ - lib
100
+ required_ruby_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: "0"
105
+ version:
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">"
109
+ - !ruby/object:Gem::Version
110
+ version: 1.3.1
111
+ version:
112
+ requirements:
113
+ - Firefox browser with JSSH extension installed
114
+ rubyforge_project:
115
+ rubygems_version: 1.3.5
116
+ signing_key:
117
+ specification_version: 3
118
+ summary: Library for automating the Firefox browser in Ruby
119
+ test_files: []
120
+