testcentricity_web 0.9.9.3 → 0.9.9.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3870981ef08e96ec8303efd7540bb20bc5b45352
4
- data.tar.gz: 7e86a7e25eabf235cdd0f29a0135cf706b4e73c3
3
+ metadata.gz: ac645f88ced33e1f75ff7707eb9131f3c4128649
4
+ data.tar.gz: 1135d24ddf6499993343634e5cda39ff32cddca3
5
5
  SHA512:
6
- metadata.gz: f4bca14d1a2a48712fe1bcd59686d410f46f51e7554d606b02bdf887845fbad5891d4d90f6149bc7f9242ffad04259bc4d5421a00ef315d507a09fbcf275b144
7
- data.tar.gz: b55fa229a110a106fc0b8a6349958c030aaeb0c1f83ba3bd5072a66233aab35ef477d23ccd482a048c8f19fdb0e2891d643a08db52a118d974a0d218e3aaee1e
6
+ metadata.gz: 150a16315f46f712217e0d20788d0c136e6e18e876193cf96db1b7103392a6aca89f337ab68959ea783138d84ade1babc9b0ff002700a85cf360d2c78943bcc1
7
+ data.tar.gz: 998ce0d83fdba227cb20d1dd99d1b610573952c61b181a81a3846610f623a1caaf5e3e69c4e3721665aa4295a4d49efd63a362671cecd2f9f790591c0ae82d8c
data/README.md CHANGED
@@ -145,10 +145,10 @@ You define your page's **Traits** as shown below:
145
145
  trait(:page_locator) { 'body.login-body' }
146
146
 
147
147
  # Login page UI elements
148
- textfield :user_id_field, '#userName'
149
- textfield :password_field, '#password'
150
- button :login_button, '#login'
151
- checkbox :remember_checkbox, '#rememberUser'
148
+ textfield :user_id_field, 'input#userName'
149
+ textfield :password_field, 'input#password'
150
+ button :login_button, 'button#login'
151
+ checkbox :remember_checkbox, 'input#rememberUser'
152
152
  label :error_message_label, 'div#statusBar.login-error'
153
153
  end
154
154
 
@@ -172,10 +172,10 @@ the UI to hide implementation details, as shown below:
172
172
  trait(:page_locator) { 'body.login-body' }
173
173
 
174
174
  # Login page UI elements
175
- textfield :user_id_field, '#userName'
176
- textfield :password_field, '#password'
177
- button :login_button, '#login'
178
- checkbox :remember_checkbox, '#rememberUser'
175
+ textfield :user_id_field, 'input#userName'
176
+ textfield :password_field, 'input#password'
177
+ button :login_button, 'button#login'
178
+ checkbox :remember_checkbox, 'input#rememberUser'
179
179
  label :error_message_label, 'div#statusBar.login-error'
180
180
  link :forgot_password_link, 'a.forgotPassword'
181
181
 
@@ -248,7 +248,7 @@ You define your page section's **Traits** as shown below:
248
248
  trait(:section_locator) { 'form#gnav-search' }
249
249
 
250
250
  # Search Form UI elements
251
- textfield :search_field, '#search-query'
251
+ textfield :search_field, 'input#search-query'
252
252
  button :search_button, 'button[type=submit]'
253
253
  end
254
254
 
@@ -261,7 +261,7 @@ You can add high level methods to your **PageSection** class definition, as show
261
261
  trait(:section_locator) { 'form#gnav-search' }
262
262
 
263
263
  # Search Form UI elements
264
- textfield :search_field, '#search-query'
264
+ textfield :search_field, 'input#search-query'
265
265
  button :search_button, 'button[type=submit]'
266
266
 
267
267
  def search_for(value)
@@ -600,7 +600,6 @@ replace the placeholder text with your user account and authorization code for t
600
600
  safari: WEB_BROWSER=safari <%= desktop %>
601
601
  chrome: WEB_BROWSER=chrome <%= desktop %>
602
602
  ie: WEB_BROWSER=ie <%= desktop %>
603
- edge: WEB_BROWSER=edge <%= desktop %>
604
603
  headless: WEB_BROWSER=poltergeist <%= desktop %>
605
604
 
606
605
  #==============
@@ -218,7 +218,7 @@ module TestCentricity
218
218
  test_value = value.split('!', 2)
219
219
  parameter = test_value[1].split('.', 2)
220
220
  case parameter[0]
221
- when 'Address', 'Business', 'Code', 'Color', 'Commerce', 'Company', 'Hacker', 'Internet', 'Lorem', 'Name', 'Number', 'PhoneNumber'
221
+ when 'Address', 'Business', 'Code', 'Color', 'Commerce', 'Company', 'Crypto', 'File', 'Hacker', 'Hipster', 'Internet', 'Lorem', 'Name', 'Number', 'PhoneNumber', 'Time'
222
222
  result = eval("Faker::#{parameter[0]}.#{parameter[1]}")
223
223
  when 'Date'
224
224
  result = eval("Chronic.parse('#{parameter[1]}')")
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '0.9.9.3'
2
+ VERSION = '0.9.9.4'
3
3
  end
@@ -29,7 +29,11 @@ module TestCentricity
29
29
  when :testingbot
30
30
  initialize_testingbot
31
31
  else
32
- initialize_local_browser(browser)
32
+ if ENV["SELENIUM"] == 'remote'
33
+ initialize_remote
34
+ else
35
+ initialize_local_browser
36
+ end
33
37
  end
34
38
 
35
39
  # set browser window size only if testing with a desktop web browser
@@ -75,7 +79,8 @@ module TestCentricity
75
79
  end
76
80
  end
77
81
 
78
- def self.initialize_local_browser(browser)
82
+ def self.initialize_local_browser
83
+ browser = ENV['WEB_BROWSER']
79
84
  Capybara.default_driver = :selenium
80
85
  Capybara.register_driver :selenium do |app|
81
86
  case browser.downcase.to_sym
@@ -132,8 +137,8 @@ module TestCentricity
132
137
  capabilities['name'] = ENV['TEST_ENVIRONMENT']
133
138
 
134
139
  capabilities['acceptSslCerts'] = 'true'
140
+ capabilities['browserstack.localIdentifier'] = ENV['BS_LOCAL_ID'] if ENV['BS_LOCAL_ID']
135
141
  capabilities['browserstack.local'] = 'true' if ENV['TUNNELING']
136
- capabilities['browserstack.localIdentifier'] = ENV['BS_LOCAL_ID'] if ENV['BS_LOCAL_ID']
137
142
 
138
143
  case browser.downcase.to_sym
139
144
  when :ie
@@ -183,6 +188,14 @@ module TestCentricity
183
188
  end
184
189
 
185
190
  def self.initialize_poltergeist
191
+ if ENV['BROWSER_SIZE']
192
+ resolution = ENV['BROWSER_SIZE'].split(',')
193
+ width = resolution[0]
194
+ height = resolution[1]
195
+ else
196
+ width = 1650
197
+ height = 1000
198
+ end
186
199
  Capybara.default_driver = :poltergeist
187
200
  Capybara.register_driver :poltergeist do |app|
188
201
  options = {
@@ -191,11 +204,22 @@ module TestCentricity
191
204
  :debug => false,
192
205
  :phantomjs_options => ['--load-images=no', '--disk-cache=false'],
193
206
  :inspector => true,
207
+ :window_size => [width, height]
194
208
  }
195
209
  Capybara::Poltergeist::Driver.new(app, options)
196
210
  end
197
211
  end
198
212
 
213
+ def self.initialize_remote
214
+ browser = ENV['WEB_BROWSER']
215
+ endpoint = 'http://127.0.0.1:4444/wd/hub'
216
+ capabilities = Selenium::WebDriver::Remote::Capabilities.send(browser.downcase.to_sym)
217
+ Capybara.register_driver :remote_browser do |app|
218
+ Capybara::Selenium::Driver.new(app, :browser => :remote, :url => endpoint, :desired_capabilities => capabilities)
219
+ end
220
+ Capybara.current_driver = :remote_browser
221
+ end
222
+
199
223
  def self.initialize_saucelabs
200
224
  browser = ENV['SL_BROWSER']
201
225
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9.3
4
+ version: 0.9.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-05 00:00:00.000000000 Z
11
+ date: 2016-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler