Ifd_Mobile 0.1.5 → 0.1.6

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: 29531fda5bb58f537c262d4fe275c5cbdb03390f
4
- data.tar.gz: e1a423ebe2eca1d54734de37e45f46e7c1888f59
3
+ metadata.gz: 5764f9e3947fec819218c26edaf9e5d0f3a7fec8
4
+ data.tar.gz: 8cadb98135a46cb6f829b130fca037e5f9672e8d
5
5
  SHA512:
6
- metadata.gz: 210a2948c239bb7edd134f68ca46df26c53fea6fe4726f4e1d725c752f275289afa42111b4601078b96d8d2a872a3738be3a1fb87b35e62c15f80f808db65494
7
- data.tar.gz: 123f938ce4cd4f9bc8e992011698e08257d5938e926b90321f7f1e943cc242e4133a018a4fa27752a6375f88835d4eb201a4044815e7ad75e51330595d2297c9
6
+ metadata.gz: 65a4fdfd2c3ad5c5a16c5150e47b30569ca3cacefe32911347a4ac0a2574db13b804066116a3e77d114e882f6d42e861782e5fb943c02a13b1e6c8cddfecd44a
7
+ data.tar.gz: 89e74c9a7bc4734254ed4f7e871dc6f156127766f4dfa07fb7ef86e3fdeabcb45adf24c8753c20b1963bfed9d6432947c8cb4eecd18bbd4b233069b163fe1ef0
@@ -37,16 +37,16 @@ Given /^I get attribute of element "(.*)"$/ do |element|
37
37
  puts actual_value
38
38
  end
39
39
 
40
- And /^I rotate device to (landscape|portrait)$/ do |type|
41
- case type.to_sym
42
- when :landscape
43
- $driver.rotate :landscape
44
- when :portrait
45
- $driver.rotate :portrait
46
- else
47
- raise "ERROR: *** unknown rotate type"
48
- end
49
- end
40
+ # And /^I rotate device to (landscape|portrait)$/ do |type|
41
+ # case type.to_sym
42
+ # when :landscape
43
+ # $driver.rotate :landscape
44
+ # when :portrait
45
+ # $driver.rotate :portrait
46
+ # else
47
+ # raise "ERROR: *** unknown rotate type"
48
+ # end
49
+ # end
50
50
 
51
51
  And /^I accept alert$/ do
52
52
  selenium.alert_accept
@@ -60,10 +60,6 @@ And /^I hide the keyboard$/ do
60
60
  selenium.hide_keyboard
61
61
  end
62
62
 
63
- And /^I delete an character$/ do
64
- system('adb shell input keyevent 67')
65
- end
66
-
67
63
  Then(/^I tap on back button of device$/) do
68
64
  navigate('back')
69
65
  end
@@ -116,3 +112,29 @@ end
116
112
  Then(/^I reset app$/) do
117
113
  reset_app
118
114
  end
115
+
116
+ And /^I delete an character on Android$/ do
117
+ delete_an_character_android
118
+ end
119
+
120
+ And /^I take a photo on Android$/ do
121
+ take_photo_android
122
+ end
123
+
124
+ And /^I go home screen Android$/ do
125
+ move_home
126
+ end
127
+
128
+ And /^I set app to run background within (\d+)$/ do |seconds|
129
+ selenium.background_app seconds
130
+ end
131
+
132
+ And /^I press button (\d+)$/ do |button_index|
133
+ # Find a button by index
134
+ button(button_index.to_i).click
135
+ end
136
+
137
+ Given /^I set text "(.*)" on filed index (\d+)$/ do |value, field|
138
+ # Get a textfield by index
139
+ textfield(field.to_i).type value
140
+ end
@@ -232,13 +232,25 @@ def long_press_on_coordinates_with_duration(x, y, duration)
232
232
  end
233
233
 
234
234
  def close_app
235
- $driver.close_app
235
+ selenium.close_app
236
236
  end
237
237
 
238
238
  def launch_app
239
- $driver.launch_app
239
+ selenium.launch
240
240
  end
241
241
 
242
242
  def reset_app
243
- $driver.reset
244
- end
243
+ selenium.reset
244
+ end
245
+
246
+ def delete_an_character_android
247
+ system('adb shell input keyevent 67')
248
+ end
249
+
250
+ def take_photo_android
251
+ system('adb shell input keyevent 27')
252
+ end
253
+
254
+ def move_home
255
+ selenium.key_event 3
256
+ end
@@ -1,5 +1,5 @@
1
1
  module Ifd
2
2
  module Mobile
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Ifd_Mobile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anh Pham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-28 00:00:00.000000000 Z
11
+ date: 2015-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -78,7 +78,7 @@ executables:
78
78
  extensions: []
79
79
  extra_rdoc_files: []
80
80
  files:
81
- - lib/Ifd_Mobile/lib_web.rb
81
+ - lib/Ifd_Mobile/lib_steps.rb
82
82
  - lib/Ifd_Mobile/methods/core.rb
83
83
  - lib/Ifd_Mobile/methods/IFD_Assertion.rb
84
84
  - lib/Ifd_Mobile/methods/lib_var.rb