selenium-client 1.2.9 → 1.2.10
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +17 -2
- data/lib/selenium/client/extensions.rb +64 -21
- data/lib/selenium/client/generated_driver.rb +42 -4
- data/lib/selenium/client/idiomatic.rb +76 -35
- data/lib/selenium/client/protocol.rb +1 -1
- data/lib/selenium/rspec/reporting/file_path_strategy.rb +3 -1
- data/lib/selenium/rspec/reporting/selenium_test_report_formatter.rb +1 -1
- data/lib/selenium/rspec/rspec_extensions.rb +1 -1
- data/lib/selenium/rspec/spec_helper.rb +10 -0
- metadata +3 -3
data/README.markdown
CHANGED
@@ -3,8 +3,12 @@ Welcome to the official Ruby driver for [Selenium Remote Control](http://seleniu
|
|
3
3
|
Mission
|
4
4
|
=======
|
5
5
|
|
6
|
-
Provide a simple
|
7
|
-
|
6
|
+
Provide a **lightweight, simple and idiomatic API to write
|
7
|
+
Selenium tests in Ruby**. Focus is also on improving test
|
8
|
+
feedback -- especially on failures -- by providing
|
9
|
+
out-of-the-box **state-of-the-art reporting capabilities**.
|
10
|
+
With screenshots, HTML snapshopts and log captures,
|
11
|
+
investigating test failures becomes a breeze.
|
8
12
|
|
9
13
|
Install It
|
10
14
|
==========
|
@@ -34,7 +38,9 @@ Features
|
|
34
38
|
* `click 'the_button_id', :wait_for => :element, :element => 'new_element_id'`
|
35
39
|
* `click 'the_button_id', :wait_for => :no_element, :element => 'disappearing_element_id'`
|
36
40
|
* `click 'the_button_id', :wait_for => :text, :text => 'New Text'`
|
41
|
+
* `click 'the_button_id', :wait_for => :text, :element => 'notification_box', :text => 'New Text'`
|
37
42
|
* `click 'the_button_id', :wait_for => :no_text, :text => 'Disappearing Text'`
|
43
|
+
* `click 'the_button_id', :wait_for => :no_text, :element => 'notification_box', :text => 'Disappearing Text'`
|
38
44
|
* `click 'the_button_id', :wait_for => :effects`
|
39
45
|
* `click 'the_button_id', :wait_for => :condition, :javascript => "some arbitrary javascript expression"`
|
40
46
|
|
@@ -216,6 +222,15 @@ Grid](http://selenium-grid.openqa.org))
|
|
216
222
|
|
217
223
|
You can then get cool reports like [this one](http://ph7spot.com/examples/selenium_rspec_report.html)
|
218
224
|
|
225
|
+
To capture screenshots and logs on failures, also make sure you
|
226
|
+
require the following files in your `spec_helper`:
|
227
|
+
|
228
|
+
require "rubygems"
|
229
|
+
require "spec"
|
230
|
+
require "selenium/client"
|
231
|
+
require "selenium/rspec/spec_helper"
|
232
|
+
|
233
|
+
|
219
234
|
Contribute and Join the Fun!
|
220
235
|
============================
|
221
236
|
|
@@ -28,7 +28,7 @@ module Selenium
|
|
28
28
|
} catch(e) {
|
29
29
|
element = null;
|
30
30
|
}
|
31
|
-
element != null
|
31
|
+
element != null;
|
32
32
|
EOS
|
33
33
|
|
34
34
|
wait_for_condition script, timeout_in_seconds
|
@@ -43,36 +43,79 @@ module Selenium
|
|
43
43
|
} catch(e) {
|
44
44
|
element = null;
|
45
45
|
}
|
46
|
-
element == null
|
46
|
+
element == null;
|
47
47
|
EOS
|
48
48
|
|
49
49
|
wait_for_condition script, timeout_in_seconds
|
50
50
|
end
|
51
51
|
|
52
52
|
# Wait for some text to be present (the wait in happenning browser side).
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
53
|
+
#
|
54
|
+
# If locator is nil or no locator is provided, the text will be
|
55
|
+
# detected anywhere in the page.
|
56
|
+
#
|
57
|
+
# If a non nil locator is provided, the text will be
|
58
|
+
# detected within the innerHTML of the element identified by the locator.
|
59
|
+
def wait_for_text(text, locator=nil, timeout_in_seconds=nil)
|
60
|
+
script = case locator
|
61
|
+
when nil:
|
62
|
+
<<-EOS
|
63
|
+
var text;
|
64
|
+
try {
|
65
|
+
text = selenium.browserbot.getCurrentWindow().find('#{text}');
|
66
|
+
} catch(e) {
|
67
|
+
text = null;
|
68
|
+
}
|
69
|
+
text != null;
|
70
|
+
EOS
|
71
|
+
else
|
72
|
+
<<-EOS
|
73
|
+
var element;
|
74
|
+
try {
|
75
|
+
element = selenium.browserbot.getCurrentWindow().findElement('#{locator}');
|
76
|
+
} catch(e) {
|
77
|
+
element = null;
|
78
|
+
}
|
79
|
+
element != null && element.innerHTML == '#{text}'";
|
80
|
+
EOS
|
81
|
+
end
|
61
82
|
|
62
83
|
wait_for_condition script, timeout_in_seconds
|
63
84
|
end
|
64
85
|
|
65
86
|
# Wait for some text to NOT be present (the wait in happenning browser side).
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
87
|
+
#
|
88
|
+
# If locator is nil or no locator is provided, the text will be
|
89
|
+
# detected anywhere in the page.
|
90
|
+
#
|
91
|
+
# If a non nil locator is provided, the text will be
|
92
|
+
# detected within the innerHTML of the element identified by the locator.
|
93
|
+
def wait_for_no_text(original_text, locator=nil, timeout_in_seconds=nil)
|
94
|
+
script = case locator
|
95
|
+
when nil:
|
96
|
+
<<-EOS
|
97
|
+
var text;
|
98
|
+
try {
|
99
|
+
text = selenium.browserbot.getCurrentWindow().find('#{original_text}');
|
100
|
+
} catch(e) {
|
101
|
+
text = false;
|
102
|
+
}
|
103
|
+
text == false;
|
104
|
+
EOS
|
105
|
+
else
|
106
|
+
<<-EOS
|
107
|
+
var element;
|
108
|
+
|
109
|
+
try {
|
110
|
+
element = selenium.browserbot.findElement('#{locator}');
|
111
|
+
} catch(e) {
|
112
|
+
element = null;
|
113
|
+
}
|
114
|
+
alert(element);
|
115
|
+
element != null && element.innerHTML != '#{original_text}'";
|
116
|
+
EOS
|
117
|
+
end
|
118
|
+
wait_for_condition script, timeout_in_seconds
|
76
119
|
end
|
77
120
|
|
78
121
|
# Wait for a field to get a specific value (the wait in happenning browser side).
|
@@ -83,7 +126,7 @@ module Selenium
|
|
83
126
|
} catch(e) {
|
84
127
|
element = null;
|
85
128
|
}
|
86
|
-
element != null && element.value == '#{expected_value}'"
|
129
|
+
element != null && element.value == '#{expected_value}'";
|
87
130
|
|
88
131
|
wait_for_condition script, timeout_in_seconds
|
89
132
|
end
|
@@ -1511,12 +1511,14 @@ module Selenium
|
|
1511
1511
|
|
1512
1512
|
|
1513
1513
|
# Saves the entire contents of the current window canvas to a PNG file.
|
1514
|
-
# Currently this only works in Mozilla and when running in chrome mode.
|
1515
1514
|
# Contrast this with the captureScreenshot command, which captures the
|
1516
1515
|
# contents of the OS viewport (i.e. whatever is currently being displayed
|
1517
|
-
# on the monitor), and is implemented in the RC only.
|
1518
|
-
#
|
1519
|
-
#
|
1516
|
+
# on the monitor), and is implemented in the RC only. Currently this only
|
1517
|
+
# works in Firefox when running in chrome mode, and in IE non-HTA using
|
1518
|
+
# the EXPERIMENTAL "Snapsie" utility. The Firefox implementation is mostly
|
1519
|
+
# borrowed from the Screengrab! Firefox extension. Please see
|
1520
|
+
# http://www.screengrab.org and http://snapsie.sourceforge.net/ for
|
1521
|
+
# details.
|
1520
1522
|
#
|
1521
1523
|
# 'filename' is the path to the file to persist the screenshot as. No filename extension will be appended by default. Directories will not be created if they do not exist, and an exception will be thrown, possibly by native code.
|
1522
1524
|
# 'kwargs' is a kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD" . Currently valid options: * background:: the background CSS for the HTML document. This may be useful to set for capturing screenshots of less-than-ideal layouts, for example where absolute positioning causes the calculation of the canvas dimension to fail and a black background is exposed (possibly obscuring black text).
|
@@ -1537,6 +1539,42 @@ module Selenium
|
|
1537
1539
|
end
|
1538
1540
|
|
1539
1541
|
|
1542
|
+
# Loads script content into a new script tag in the Selenium document. This
|
1543
|
+
# differs from the runScript command in that runScript adds the script tag
|
1544
|
+
# to the document of the AUT, not the Selenium document. The following
|
1545
|
+
# entities in the script content are replaced by the characters they
|
1546
|
+
# represent:
|
1547
|
+
#
|
1548
|
+
# <
|
1549
|
+
# >
|
1550
|
+
# &
|
1551
|
+
#
|
1552
|
+
# The corresponding remove command is removeScript.
|
1553
|
+
#
|
1554
|
+
# 'scriptContent' is the Javascript content of the script to add
|
1555
|
+
# 'scriptTagId' is (optional) the id of the new script tag. If specified, and an element with this id already exists, this operation will fail.
|
1556
|
+
def add_script(scriptContent,scriptTagId)
|
1557
|
+
remote_control_command("addScript", [scriptContent,scriptTagId,])
|
1558
|
+
end
|
1559
|
+
|
1560
|
+
|
1561
|
+
# Removes a script tag from the Selenium document identified by the given
|
1562
|
+
# id. Does nothing if the referenced tag doesn't exist.
|
1563
|
+
#
|
1564
|
+
# 'scriptTagId' is the id of the script element to remove.
|
1565
|
+
def remove_script(scriptTagId)
|
1566
|
+
remote_control_command("removeScript", [scriptTagId,])
|
1567
|
+
end
|
1568
|
+
|
1569
|
+
|
1570
|
+
# Allows choice of one of the available libraries.
|
1571
|
+
#
|
1572
|
+
# 'libraryName' is name of the desired library Only the following three can be chosen: ajaxslt - Google's library javascript - Cybozu Labs' faster library default - The default library. Currently the default library is ajaxslt. If libraryName isn't one of these three, then no change will be made.
|
1573
|
+
def use_xpath_library(libraryName)
|
1574
|
+
remote_control_command("useXpathLibrary", [libraryName,])
|
1575
|
+
end
|
1576
|
+
|
1577
|
+
|
1540
1578
|
# Writes a message to the status bar and adds a note to the browser-side
|
1541
1579
|
# log.
|
1542
1580
|
#
|
@@ -15,18 +15,20 @@ module Selenium
|
|
15
15
|
# rendered text shown to the user.
|
16
16
|
#
|
17
17
|
# * 'locator' is an Selenium element locator
|
18
|
+
#
|
19
|
+
# TODO - Should be renamed 'text'
|
18
20
|
def text_content(locator)
|
19
|
-
string_command"getText", [locator,]
|
21
|
+
string_command "getText", [locator,]
|
20
22
|
end
|
21
23
|
|
22
24
|
# Return the title of the current HTML page.
|
23
25
|
def title
|
24
|
-
string_command"getTitle"
|
26
|
+
string_command "getTitle"
|
25
27
|
end
|
26
28
|
|
27
29
|
# Returns the absolute URL of the current page.
|
28
30
|
def location
|
29
|
-
string_command"getLocation"
|
31
|
+
string_command "getLocation"
|
30
32
|
end
|
31
33
|
|
32
34
|
# Waits for a new page to load.
|
@@ -40,20 +42,33 @@ module Selenium
|
|
40
42
|
# * 'timeout_in_seconds' is a timeout in seconds, after which this
|
41
43
|
# command will return with an error
|
42
44
|
def wait_for_page(timeout_in_seconds=nil)
|
43
|
-
|
45
|
+
actual_timeout = timeout_in_seconds || default_timeout_in_seconds
|
44
46
|
remote_control_command "waitForPageToLoad", [actual_timeout * 1000,]
|
45
47
|
end
|
48
|
+
alias_method :wait_for_page_to_load, :wait_for_page
|
49
|
+
|
50
|
+
# Waits for a popup window to appear and load up.
|
51
|
+
#
|
52
|
+
# window_id is the JavaScript window "name" of the window that will appear (not the text of the title bar)
|
53
|
+
# timeout_in_seconds is a timeout in seconds, after which the action will return with an error
|
54
|
+
def wait_for_popup(window_id, timeout_in_seconds=nil)
|
55
|
+
actual_timeout = timeout_in_seconds || default_timeout_in_seconds
|
56
|
+
remote_control_command "waitForPopUp", [window_id, actual_timeout * 1000 ,]
|
57
|
+
end
|
46
58
|
|
47
59
|
# Flexible wait semantics. ait is happening browser side. Useful for testing AJAX application.
|
48
60
|
#
|
49
|
-
# * wait :wait_for => :page
|
50
|
-
# * wait :wait_for => :
|
51
|
-
# * wait :wait_for => :
|
52
|
-
# * wait :wait_for => :
|
53
|
-
# * wait :wait_for => :
|
54
|
-
# * wait :wait_for => :
|
55
|
-
# * wait :wait_for => :
|
56
|
-
# * wait :wait_for => :
|
61
|
+
# * wait :wait_for => :page # will wait for a new page to load
|
62
|
+
# * wait :wait_for => :popup, :window => 'a window id' # will wait for a new popup window to appear. Also selects the popup window for you provide `:select => true`
|
63
|
+
# * wait :wait_for => :ajax # will wait for all ajax requests to be completed (Prototype only)
|
64
|
+
# * wait :wait_for => :effects # will wait for all Prototype effects to be rendered
|
65
|
+
# * wait :wait_for => :element, :element => 'new_element_id' # will wait for an element to be present/appear
|
66
|
+
# * wait :wait_for => :no_element, :element => 'new_element_id' # will wait for an element to be not be present/disappear
|
67
|
+
# * wait :wait_for => :text, :text => 'some text' # will wait for some text to be present/appear
|
68
|
+
# * wait :wait_for => :text, :element => 'a_locator', :text => 'some text' # will wait for the content of 'a_locator' to be 'some text'
|
69
|
+
# * wait :wait_for => :no_text, :text => 'some text' # will wait for the text to be not be present/disappear
|
70
|
+
# * wait :wait_for => :no_text, :element => 'a_locator', :text => 'some text' # will wait for the content of 'a_locator' to not be 'some text'
|
71
|
+
# * wait :wait_for => :condition, :javascript => 'some expression' # will wait for the javascript expression to be true
|
57
72
|
#
|
58
73
|
# Using options you can also define an explicit timeout (:timeout_in_seconds key). Otherwise the default driver timeout
|
59
74
|
# is used.
|
@@ -67,11 +82,14 @@ module Selenium
|
|
67
82
|
elsif options[:wait_for] == :no_element
|
68
83
|
wait_for_no_element options[:element], options[:timeout_in_seconds]
|
69
84
|
elsif options[:wait_for] == :text
|
70
|
-
wait_for_text options[:text], options[:timeout_in_seconds]
|
85
|
+
wait_for_text options[:text], options[:element], options[:timeout_in_seconds]
|
71
86
|
elsif options[:wait_for] == :no_text
|
72
|
-
|
87
|
+
wait_for_no_text options[:text], options[:element], options[:timeout_in_seconds]
|
73
88
|
elsif options[:wait_for] == :effects
|
74
89
|
wait_for_effects options[:timeout_in_seconds]
|
90
|
+
elsif options[:wait_for] == :popup
|
91
|
+
wait_for_popup options[:window], options[:timeout_in_seconds]
|
92
|
+
select_window options[:window] if options[:select]
|
75
93
|
elsif options[:wait_for] == :condition
|
76
94
|
wait_for_condition options[:javascript], options[:timeout_in_seconds]
|
77
95
|
end
|
@@ -79,7 +97,7 @@ module Selenium
|
|
79
97
|
|
80
98
|
# Gets the entire text of the page.
|
81
99
|
def body_text
|
82
|
-
string_command"getBodyText"
|
100
|
+
string_command "getBodyText"
|
83
101
|
end
|
84
102
|
|
85
103
|
# Clicks on a link, button, checkbox or radio button.
|
@@ -89,19 +107,22 @@ module Selenium
|
|
89
107
|
# Using 'options' you can automatically wait for an event to happen after the
|
90
108
|
# click. e.g.
|
91
109
|
#
|
92
|
-
# * click
|
93
|
-
# * click
|
94
|
-
# * click
|
95
|
-
# * click
|
96
|
-
# * click
|
110
|
+
# * click :wait_for => :page # will wait for a new page to load
|
111
|
+
# * click :wait_for => :popup, :window => 'a window id' # will wait for a new popup window to appear. Also selects the popup window for you provide `:select => true`
|
112
|
+
# * click :wait_for => :ajax # will wait for all ajax requests to be completed (Prototype only)
|
113
|
+
# * click :wait_for => :effects # will wait for all Prototype effects to be rendered
|
114
|
+
# * click :wait_for => :element, :element => 'new_element_id' # will wait for an element to be present/appear
|
115
|
+
# * click :wait_for => :no_element, :element => 'new_element_id' # will wait for an element to be not be present/disappear
|
97
116
|
# * click :wait_for => :text, :text => 'some text' # will wait for some text to be present/appear
|
117
|
+
# * click :wait_for => :text, :element => 'a_locator', :text => 'some text' # will wait for the content of 'a_locator' to be 'some text'
|
98
118
|
# * click :wait_for => :no_text, :text => 'some text' # will wait for the text to be not be present/disappear
|
99
|
-
# * click
|
119
|
+
# * click :wait_for => :no_text, :element => 'a_locator', :text => 'some text' # will wait for the content of 'a_locator' to not be 'some text'
|
120
|
+
# * click :wait_for => :condition, :javascript => 'some expression' # will wait for the javascript expression to be true
|
100
121
|
#
|
101
122
|
# Using options you can also define an explicit timeout (:timeout_in_seconds key). Otherwise the default driver timeout
|
102
123
|
# is used.
|
103
124
|
def click(locator, options={})
|
104
|
-
remote_control_command
|
125
|
+
remote_control_command "click", [locator,]
|
105
126
|
wait_for options
|
106
127
|
end
|
107
128
|
|
@@ -162,7 +183,7 @@ module Selenium
|
|
162
183
|
# generated and Selenium will hang until someone manually clicks OK.
|
163
184
|
#
|
164
185
|
def alert
|
165
|
-
string_command"getAlert"
|
186
|
+
string_command "getAlert"
|
166
187
|
end
|
167
188
|
|
168
189
|
# Whether a confirmation has been auto-acknoledged (i.e. confirm() been called)
|
@@ -188,7 +209,7 @@ module Selenium
|
|
188
209
|
# dialog WILL be generated and Selenium will hang until you manually click
|
189
210
|
# OK.
|
190
211
|
def confirmation
|
191
|
-
string_command"getConfirmation"
|
212
|
+
string_command "getConfirmation"
|
192
213
|
end
|
193
214
|
|
194
215
|
# Whether a prompt occurred
|
@@ -210,7 +231,7 @@ module Selenium
|
|
210
231
|
# page's onload() event handler. In this case a visible dialog WILL be
|
211
232
|
# generated and Selenium will hang until someone manually clicks OK.
|
212
233
|
def prompt
|
213
|
-
string_command"getPrompt"
|
234
|
+
string_command "getPrompt"
|
214
235
|
end
|
215
236
|
|
216
237
|
# Returns the result of evaluating the specified JavaScript snippet whithin the browser.
|
@@ -225,7 +246,7 @@ module Selenium
|
|
225
246
|
#
|
226
247
|
# * 'script' is the JavaScript snippet to run
|
227
248
|
def js_eval(script)
|
228
|
-
string_command"getEval", [script,]
|
249
|
+
string_command "getEval", [script,]
|
229
250
|
end
|
230
251
|
|
231
252
|
# Set the Remote Control timeout (as opposed to the client side driver timeout).
|
@@ -267,14 +288,17 @@ module Selenium
|
|
267
288
|
# Using 'options' you can automatically wait for an event to happen after the
|
268
289
|
# click. e.g.
|
269
290
|
#
|
270
|
-
# * go_back :wait_for => :page
|
271
|
-
# * go_back :wait_for => :
|
272
|
-
# * go_back :wait_for => :
|
273
|
-
# * go_back :wait_for => :
|
274
|
-
# * go_back :wait_for => :
|
275
|
-
# * go_back :wait_for => :
|
276
|
-
# * go_back :wait_for => :
|
277
|
-
# * go_back :wait_for => :
|
291
|
+
# * go_back :wait_for => :page # will wait for a new page to load
|
292
|
+
# * go_back :wait_for => :popup, :window => 'a window id' # will wait for a new popup window to appear. Also selects the popup window for you provide `:select => true`
|
293
|
+
# * go_back :wait_for => :ajax # will wait for all ajax requests to be completed (Prototype only)
|
294
|
+
# * go_back :wait_for => :effects # will wait for all Prototype effects to be rendered
|
295
|
+
# * go_back :wait_for => :element, :element => 'new_element_id' # will wait for an element to be present/appear
|
296
|
+
# * go_back :wait_for => :no_element, :element => 'new_element_id' # will wait for an element to be not be present/disappear
|
297
|
+
# * go_back :wait_for => :text, :text => 'some text' # will wait for some text to be present/appear
|
298
|
+
# * go_back :wait_for => :text, :element => 'a_locator', :text => 'some text' # will wait for the content of 'a_locator' to be 'some text'
|
299
|
+
# * go_back :wait_for => :no_text, :text => 'some text' # will wait for the text to be not be present/disappear
|
300
|
+
# * go_back :wait_for => :no_text, :element => 'a_locator', :text => 'some text' # will wait for the content of 'a_locator' to not be 'some text'
|
301
|
+
# * go_back :wait_for => :condition, :javascript => 'some expression' # will wait for the javascript expression to be true
|
278
302
|
#
|
279
303
|
# Using options you can also define an explicit timeout (:timeout_in_seconds key). Otherwise the default driver timeout
|
280
304
|
# is used.
|
@@ -310,7 +334,7 @@ module Selenium
|
|
310
334
|
# the optionsString's format is "path=/path/, max_age=60, domain=.foo.com". The order of options are irrelevant, the unit of the value of 'max_age' is second. Note that specifying a domain that isn't a subset of the current domain will usually fail.
|
311
335
|
def create_cookie(name_value_pair, options="")
|
312
336
|
if options.kind_of? Hash
|
313
|
-
options = options.keys.collect {|key| "#{key}=#{options[key]}" }.join(", ")
|
337
|
+
options = options.keys.collect {|key| "#{key}=#{options[key]}" }.sort.join(", ")
|
314
338
|
end
|
315
339
|
remote_control_command "createCookie", [name_value_pair,options,]
|
316
340
|
end
|
@@ -336,6 +360,23 @@ module Selenium
|
|
336
360
|
remote_control_command "deleteCookie", [name,options,]
|
337
361
|
end
|
338
362
|
|
363
|
+
# Returns the IDs of all windows that the browser knows about.
|
364
|
+
def all_window_ids
|
365
|
+
string_array_command "getAllWindowIds"
|
366
|
+
end
|
367
|
+
|
368
|
+
|
369
|
+
# Returns the names of all windows that the browser knows about.
|
370
|
+
def all_window_names
|
371
|
+
string_array_command "getAllWindowNames"
|
372
|
+
end
|
373
|
+
|
374
|
+
|
375
|
+
# Returns the titles of all windows that the browser knows about.
|
376
|
+
def all_window_titles
|
377
|
+
string_array_command "getAllWindowTitles"
|
378
|
+
end
|
379
|
+
|
339
380
|
end
|
340
381
|
|
341
382
|
end
|
@@ -60,7 +60,9 @@ module Selenium
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def example_hash(example)
|
63
|
-
|
63
|
+
# backtrace is not reliable anymore using the implementation proc
|
64
|
+
implementation = example.instance_variable_get :'@_implementation'
|
65
|
+
Digest::MD5.hexdigest implementation.inspect
|
64
66
|
end
|
65
67
|
|
66
68
|
end
|
@@ -18,5 +18,15 @@ Spec::Runner.configure do |config|
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
config.append_before(:each) do
|
22
|
+
begin
|
23
|
+
if selenium_driver && selenium_driver.session_started?
|
24
|
+
selenium_driver.set_context "Starting example '#{self.description}'"
|
25
|
+
end
|
26
|
+
rescue Exception => e
|
27
|
+
STDERR.puts "Problem while setting context on example start" + e
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
21
31
|
end
|
22
32
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selenium-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenQA
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-02-02 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements: []
|
73
73
|
|
74
74
|
rubyforge_project: selenium-client
|
75
|
-
rubygems_version: 1.
|
75
|
+
rubygems_version: 1.3.1
|
76
76
|
signing_key:
|
77
77
|
specification_version: 2
|
78
78
|
summary: Official Ruby Client for Selenium RC.
|