test-factory 0.2.2 → 0.2.3

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.
data/chromedriver.log CHANGED
@@ -1,5 +1,5 @@
1
- [0.007][INFO]: ChromeDriver 21.0.1180.4 /Users/abrahamheward/.rvm/bin/chromedriver
2
- [0.222][FINE]: Initializing session with capabilities {
1
+ [0.000][INFO]: ChromeDriver 19.0.1068.0 /opt/local/bin/chromedriver
2
+ [0.268][FINE]: Initializing session with capabilities {
3
3
  "browserName": "chrome",
4
4
  "chrome.detach": true,
5
5
  "chromeOptions": {
@@ -14,52 +14,5 @@
14
14
  "version": ""
15
15
  }
16
16
 
17
- [0.223][INFO]: Using named testing interface
18
- [1.613][INFO]: Connected to Chrome successfully. Version: 24.0.1312.56
19
- [1.660][FINE]: Command received (/session/0191148c7a15996e2a76f1f21531a758)
20
- [1.660][FINE]: Command finished (/session/0191148c7a15996e2a76f1f21531a758) with response {
21
- "sessionId": "0191148c7a15996e2a76f1f21531a758",
22
- "status": 0,
23
- "value": {
24
- "acceptSslCerts": false,
25
- "applicationCacheEnabled": false,
26
- "browserConnectionEnabled": false,
27
- "browserName": "chrome",
28
- "chrome.chromedriverVersion": "21.0.1180.4",
29
- "chrome.nativeEvents": false,
30
- "cssSelectorsEnabled": true,
31
- "databaseEnabled": false,
32
- "handlesAlerts": true,
33
- "javascriptEnabled": true,
34
- "locationContextEnabled": false,
35
- "nativeEvents": true,
36
- "platform": "mac",
37
- "rotatable": false,
38
- "takesScreenshot": true,
39
- "version": "24.0.1312.56",
40
- "webStorageEnabled": true
41
- }
42
- }
43
-
44
- [1.661][FINE]: Command received (/session/0191148c7a15996e2a76f1f21531a758/url)
45
- [1.661][FINER]: Waiting for all views to stop loading...
46
- [1.661][FINER]: Done waiting for all views to stop loading
47
- [1.664][FINER]: Waiting for all views to stop loading...
48
- [1.665][FINER]: Done waiting for all views to stop loading
49
- [1.665][FINE]: Command finished (/session/0191148c7a15996e2a76f1f21531a758/url) with response {
50
- "sessionId": "0191148c7a15996e2a76f1f21531a758",
51
- "status": 0,
52
- "value": "chrome://newtab/"
53
- }
54
-
55
- [1.665][FINE]: Command received (/session/0191148c7a15996e2a76f1f21531a758/title)
56
- [1.665][FINER]: Waiting for all views to stop loading...
57
- [1.665][FINER]: Done waiting for all views to stop loading
58
- [1.668][FINER]: Waiting for all views to stop loading...
59
- [1.668][FINER]: Done waiting for all views to stop loading
60
- [1.669][FINE]: Command finished (/session/0191148c7a15996e2a76f1f21531a758/title) with response {
61
- "sessionId": "0191148c7a15996e2a76f1f21531a758",
62
- "status": 0,
63
- "value": "New Tab"
64
- }
65
-
17
+ [0.269][INFO]: Using named testing interface
18
+ [45.523][SEVERE]: Failed to initialize connection
@@ -136,25 +136,26 @@ module Watir
136
136
  select_by :text, str_or_rx unless str_or_rx==nil
137
137
  end
138
138
 
139
- # Allows you to select an item from a selection list
140
- # at random. It returns the selected item so that
141
- # the data object's class instance variable will
142
- # have the correct value.
139
+ # Allows you to select a specific item in a
140
+ # select list, or, if desired, it will pick an item from
141
+ # the list at random.
142
+ #
143
+ # If you pass this method the string '::random::' then
144
+ # it will select an item at random from the select
145
+ # list and, assuming what you passed it was a class instance
146
+ # variable, it will be updated to contain the
147
+ # selected value (hence the ! in the method name).
143
148
  #
144
- # In other words, proper use of this method involves
145
- # setting the associated class instance variable
146
- # with it, like so...
147
149
  # @example
148
- # @my_selection=:random
149
- # @my_selection=page.select_list.pick @my_selection
150
+ # @my_selection='::random::'
151
+ # page.select_list.pick! @my_selection
150
152
  # puts @my_selection # => <Value of randomly selected item from list>
151
153
  #
152
- def pick(item)
153
- if item==:random
154
- select_at_random
154
+ def pick!(item)
155
+ if item=='::random::'
156
+ item.replace(select_at_random)
155
157
  else
156
158
  fit item
157
- item
158
159
  end
159
160
  end
160
161
 
@@ -163,7 +164,7 @@ module Watir
163
164
  def select_at_random
164
165
  text_array = []
165
166
  options.each { |opt| text_array << opt.text }
166
- text_array.delete_if { |text| text=="select" || text=="" }
167
+ text_array.delete_if { |text| text=='select' || text=='' }
167
168
  item = text_array.sample
168
169
  select item
169
170
  item
data/test-factory.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'test-factory'
3
- s.version = '0.2.2'
3
+ s.version = '0.2.3'
4
4
  s.summary = %q{rSmart's framework for creating automated testing scripts}
5
5
  s.description = %q{This gem provides a set of modules and methods to help quickly and DRYly create a test automation framework using Ruby and Watir (or watir-webdriver).}
6
6
  s.files = Dir.glob("**/**/**")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-factory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-12 00:00:00.000000000 Z
12
+ date: 2013-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: watir-webdriver