rwebspec-webdriver 0.4.2 → 0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/Rakefile +1 -1
- data/lib/rwebspec-webdriver.rb +1 -1
- data/lib/rwebspec-webdriver/driver.rb +1 -0
- data/lib/rwebspec-webdriver/testwise_plugin.rb +17 -6
- data/lib/rwebspec-webdriver/web_browser.rb +2 -13
- metadata +16 -8
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
@@ -69,7 +69,7 @@ end
|
|
69
69
|
spec = Gem::Specification.new do |s|
|
70
70
|
s.platform= Gem::Platform::RUBY
|
71
71
|
s.name = "rwebspec-webdriver"
|
72
|
-
s.version = "0.
|
72
|
+
s.version = "0.5"
|
73
73
|
s.summary = "Executable functional specification for web applications in RSpec syntax and Selenium-WebDriver"
|
74
74
|
# s.description = ""
|
75
75
|
|
data/lib/rwebspec-webdriver.rb
CHANGED
@@ -24,18 +24,29 @@ module RWebSpec
|
|
24
24
|
if $TESTWISE_OPERATION_DELAY && $TESTWISE_OPERATION_DELAY > 0 &&
|
25
25
|
$TESTWISE_OPERATION_DELAY && $TESTWISE_OPERATION_DELAY < 30000 then # max 30 seconds
|
26
26
|
sleep($TESTWISE_OPERATION_DELAY / 1000)
|
27
|
-
end
|
28
|
-
|
29
|
-
while $TESTWISE_PAUSE
|
30
|
-
debug("Paused, waiting ...")
|
31
|
-
sleep 1
|
32
|
-
end
|
27
|
+
end
|
33
28
|
rescue => e
|
34
29
|
puts "Error on delaying: #{e}"
|
35
30
|
# ignore
|
36
31
|
end
|
37
32
|
end
|
38
33
|
|
34
|
+
def check_for_pause
|
35
|
+
|
36
|
+
if $TESTWISE_READY_TO_PAUSE
|
37
|
+
# Already executed the the line immedately above,
|
38
|
+
# give some buffer time for TW to set $TESTWISE_PAUSE flag
|
39
|
+
sleep 0.5
|
40
|
+
end
|
41
|
+
|
42
|
+
# If the executed line no change, ignore
|
43
|
+
while $TESTWISE_PAUSE
|
44
|
+
Thread.pass
|
45
|
+
debug("[selenium_webdriver_extension] Paused, waiting ...")
|
46
|
+
sleep 1
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
39
50
|
def notify_screenshot_location(image_file_path)
|
40
51
|
connect_to_testwise(" SHOT", image_file_path)
|
41
52
|
end
|
@@ -515,19 +515,8 @@ module RWebSpec
|
|
515
515
|
# Select a dropdown list by name
|
516
516
|
# Usage:
|
517
517
|
# select_option("country", "Australia")
|
518
|
-
def select_option(selectName, text)
|
519
|
-
|
520
|
-
|
521
|
-
options = select_box.find_elements(:tag_name, "option")
|
522
|
-
options.each do |opt|
|
523
|
-
opt.click
|
524
|
-
if text == opt.text
|
525
|
-
opt.click
|
526
|
-
return true
|
527
|
-
end
|
528
|
-
end
|
529
|
-
|
530
|
-
raise "no option with text '#{text}' found for select list name = '#{selectName}"
|
518
|
+
def select_option(selectName, text)
|
519
|
+
Selenium::WebDriver::Support::Select.new(find_element(:name, selectName)).select_by(:text, text)
|
531
520
|
end
|
532
521
|
|
533
522
|
# submit first submit button
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rwebspec-webdriver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 1
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 0
|
7
|
-
-
|
8
|
-
|
9
|
-
version: 0.4.2
|
8
|
+
- 5
|
9
|
+
version: "0.5"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Zhimin Zhan
|
@@ -14,16 +14,17 @@ autorequire: rwebspec-webdriver
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2012-
|
18
|
-
default_executable:
|
17
|
+
date: 2012-08-13 00:00:00 Z
|
19
18
|
dependencies:
|
20
19
|
- !ruby/object:Gem::Dependency
|
21
20
|
name: rspec
|
22
21
|
prerelease: false
|
23
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
|
+
none: false
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
+
hash: 23
|
27
28
|
segments:
|
28
29
|
- 2
|
29
30
|
- 10
|
@@ -34,9 +35,11 @@ dependencies:
|
|
34
35
|
name: rspec-core
|
35
36
|
prerelease: false
|
36
37
|
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
37
39
|
requirements:
|
38
40
|
- - ">="
|
39
41
|
- !ruby/object:Gem::Version
|
42
|
+
hash: 37
|
40
43
|
segments:
|
41
44
|
- 2
|
42
45
|
- 10
|
@@ -48,9 +51,11 @@ dependencies:
|
|
48
51
|
name: selenium-webdriver
|
49
52
|
prerelease: false
|
50
53
|
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
51
55
|
requirements:
|
52
56
|
- - ">="
|
53
57
|
- !ruby/object:Gem::Version
|
58
|
+
hash: 13
|
54
59
|
segments:
|
55
60
|
- 2
|
56
61
|
- 0
|
@@ -91,7 +96,6 @@ files:
|
|
91
96
|
- lib/rwebspec-webdriver/web_testcase.rb
|
92
97
|
- lib/rwebspec-webdriver.rb
|
93
98
|
- lib/webdriver_extensions.rb
|
94
|
-
has_rdoc: true
|
95
99
|
homepage: http://github.com/zhimin/rwebspec-webdriver/tree/master
|
96
100
|
licenses: []
|
97
101
|
|
@@ -101,23 +105,27 @@ rdoc_options: []
|
|
101
105
|
require_paths:
|
102
106
|
- lib
|
103
107
|
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
104
109
|
requirements:
|
105
110
|
- - ">="
|
106
111
|
- !ruby/object:Gem::Version
|
112
|
+
hash: 3
|
107
113
|
segments:
|
108
114
|
- 0
|
109
115
|
version: "0"
|
110
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
|
+
none: false
|
111
118
|
requirements:
|
112
119
|
- - ">="
|
113
120
|
- !ruby/object:Gem::Version
|
121
|
+
hash: 3
|
114
122
|
segments:
|
115
123
|
- 0
|
116
124
|
version: "0"
|
117
125
|
requirements:
|
118
126
|
- none
|
119
127
|
rubyforge_project: rwebspec-webdriver
|
120
|
-
rubygems_version: 1.
|
128
|
+
rubygems_version: 1.8.24
|
121
129
|
signing_key:
|
122
130
|
specification_version: 3
|
123
131
|
summary: Executable functional specification for web applications in RSpec syntax and Selenium-WebDriver
|