applenium 0.0.7 → 0.0.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 29b868c838febb09c925378ba9cec4f600d78978
4
- data.tar.gz: ccfe22a67b0bbadeccad022809aa2fe433060bd5
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MDllYTAyN2FmMmIyMzFiMTdlOGU2MTc0OWZkY2JkN2EyMWUyYWQ0MQ==
5
+ data.tar.gz: !binary |-
6
+ MWQ0MmUwZWI0NDJmNDliM2JkYTcwYTM5ZjkzMDA0NGVkYjRkYTUxNg==
5
7
  SHA512:
6
- metadata.gz: 8beebfa5a83dcde58f2e4912c09357f6efe73388635345553c371bf85c70787860179d1309ec82a8b68a8197ea2909515b1e2dd003454539a37e9d5500809062
7
- data.tar.gz: e1c0f1f1b0d73db09975165a3aa577fa5e4b7b1fc38b31c721e84e460d140b02a8edb04fa3f0d2f43f6e7ed2d2e29259ea9fd47c5bb7c019e8d9aae5bc79a788
8
+ metadata.gz: !binary |-
9
+ NTA0OGRlZDMzNTE0ZWE4MTBlODg4NjljYjQ2MTc5MzQzOTQ4MjZhMTRlN2Fj
10
+ YWFiODRhYmM5MDUxYTlhODBhN2RiYTI2NmE5ZWJlNmY1NDNmYzA2MjIyNzQ3
11
+ YmM0N2NjNDJkYTMxMmY2NmZjYjBjNjE5Y2UzNWIyYTYyZWFhMzk=
12
+ data.tar.gz: !binary |-
13
+ MTIwZWFlN2NlYzYyZTJiMWQ2ZmExNDhkYmU3ODJlZThhNGNmYjQzZmYyOTBk
14
+ ODU5M2E4NzIzZGQ1Y2ZhOTBmOTBmOGFhNDBmMjE3MGEyNDM3MDU5Nzk0N2Y3
15
+ NDM4Yjg1M2YxNjcyMTliNjcxODU1YjJjZjcwNDY3NWQ0ZGE5OWU=
@@ -0,0 +1,45 @@
1
+ require_relative 'web/web_methods'
2
+
3
+ Then(/^page should have title "(.*?)"$/) do |title|
4
+ page.shaould have_title(title)
5
+ end
6
+
7
+ Then(/^I should see element "(.*?)" having text "(.*?)"$/) do |element, text|
8
+ page.should have_css(element, :text => text)
9
+ end
10
+
11
+ Then(/^page should have element "(.*?)"$/) do |element|
12
+ page.should have_css(element)
13
+ end
14
+
15
+ Then(/^I should see element "(.*?)" having count "(.*?)"$/) do |element, count|
16
+ page.should have_css(element, :count => count)
17
+ end
18
+
19
+ Then(/^page should have button "(.*?)"$/) do |button|
20
+ page.should have_buttton(button)
21
+ end
22
+
23
+ Then(/^page should have field "(.*?)"$/) do |field|
24
+ page.should have_field(field)
25
+ end
26
+
27
+ Then(/^page should have link "(.*?)"$/) do |link|
28
+ page.should have_link(link)
29
+ end
30
+
31
+ Then(/^page should have table "(.*?)"$/) do |table|
32
+ page.should have_table(table)
33
+ end
34
+
35
+ Then(/^I should see an element "(.*?)" with checked field$/) do |element|
36
+ page.should have_checked_field(element)
37
+ end
38
+
39
+ Then(/^I should see an element "(.*?)" with unchecked field$/) do |element|
40
+ page.should have_unchecked_field(element)
41
+ end
42
+
43
+ Then(/^I should see "(.*?)" in the page$/) do |content|
44
+ page.should have_content(content)
45
+ end
@@ -0,0 +1,33 @@
1
+ require_relative 'web/web_methods'
2
+
3
+ Given(/^I am on the page "(.*?)"$/) do |url|
4
+ visit(url)
5
+ end
6
+
7
+ When(/^I go forward using browser$/) do
8
+ go_forward
9
+ end
10
+
11
+ When(/^I go back using browser$/) do
12
+ go_back
13
+ end
14
+
15
+ When(/^browser is refreshed$/) do
16
+ page.driver.browser.refresh
17
+ end
18
+
19
+ When(/^I have switched to another window "(.*?)"$/) do |handle|
20
+ switch_to_window(handle)
21
+ end
22
+
23
+ When(/^browser window is resized to width "(.*?)" and height "(.*?)"$/) do |width, height|
24
+ resize_to(width, height)
25
+ end
26
+
27
+ When(/^browser window is maximized$/) do
28
+ maximize_window
29
+ end
30
+
31
+ When(/^I closed browser window$/) do
32
+ close_window
33
+ end
@@ -1,3 +1,3 @@
1
1
  module Applenium
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -1,2 +1,18 @@
1
1
  require 'net/https'
2
2
  require_relative 'required_files'
3
+
4
+ def check_valid_locator_type? type
5
+ %w(id class css name xpath).include? type
6
+ end
7
+
8
+ def check_selector type
9
+ raise "Please use correct locator only id,name,css,xpath are supported - #{type}" unless check_valid_locator_type? type
10
+ end
11
+
12
+ def check_valid_option_by? option_by
13
+ %w(text value index).include? option_by
14
+ end
15
+
16
+ def validate_option_by option_by
17
+ raise "Please select valid option, invalid option - #{option_by}" unless check_valid_option_by? option_by
18
+ end
@@ -11,3 +11,43 @@ end
11
11
  Then(/^I should see "(.*?)"$/) do |text|
12
12
  page.should have_content text
13
13
  end
14
+
15
+ When(/^I fill "(.*?)" into field with (.+) "(.*?)"$/) do |data, type, locator|
16
+ fill_in locator, with: data
17
+ end
18
+
19
+ When(/^I click on element "(.*?)"$/) do |link|
20
+ click_link(link)
21
+ end
22
+
23
+ When(/^I click on button "(.*?)"$/) do |button|
24
+ click_button(button)
25
+ end
26
+
27
+ When(/^I click on link having text "(.*?)"$/) do |text|
28
+ click_link(text)
29
+ end
30
+
31
+ When(/^I checked checkbox "(.*?)"$/) do |box|
32
+ check(box)
33
+ end
34
+
35
+ When(/^I unchecked checkbox "(.*?)"$/) do |box|
36
+ uncheck(box)
37
+ end
38
+
39
+ When(/^I choose radio button"(.*?)"$/) do |radiobutton|
40
+ choose(radiobutton)
41
+ end
42
+
43
+ When(/^I select option "(.*?)" from dropdown "(.*?)"$/) do |option, dropdown|
44
+ select(option, :from => dropdown)
45
+ end
46
+
47
+ When(/^I attached file "(.*?)" to field "(.*?)"$/) do |file, locator|
48
+ attach_file(locator, file)
49
+ end
50
+
51
+ When(/^I hover over element"(.*?)"$/) do |element|
52
+ page.find(element).hover
53
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: applenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shashikant86
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-04 00:00:00.000000000 Z
11
+ date: 2015-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -17,7 +17,7 @@ dependencies:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
- - - '>='
20
+ - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
22
  version: 1.3.18
23
23
  type: :runtime
@@ -27,7 +27,7 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: '1.3'
30
- - - '>='
30
+ - - ! '>='
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.3.18
33
33
  - !ruby/object:Gem::Dependency
@@ -37,7 +37,7 @@ dependencies:
37
37
  - - ~>
38
38
  - !ruby/object:Gem::Version
39
39
  version: 2.4.4
40
- - - '>='
40
+ - - ! '>='
41
41
  - !ruby/object:Gem::Version
42
42
  version: 2.4.1
43
43
  type: :runtime
@@ -47,7 +47,7 @@ dependencies:
47
47
  - - ~>
48
48
  - !ruby/object:Gem::Version
49
49
  version: 2.4.4
50
- - - '>='
50
+ - - ! '>='
51
51
  - !ruby/object:Gem::Version
52
52
  version: 2.4.1
53
53
  - !ruby/object:Gem::Dependency
@@ -57,7 +57,7 @@ dependencies:
57
57
  - - ~>
58
58
  - !ruby/object:Gem::Version
59
59
  version: 3.2.0
60
- - - '>='
60
+ - - ! '>='
61
61
  - !ruby/object:Gem::Version
62
62
  version: 3.0.0
63
63
  type: :runtime
@@ -67,7 +67,7 @@ dependencies:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: 3.2.0
70
- - - '>='
70
+ - - ! '>='
71
71
  - !ruby/object:Gem::Version
72
72
  version: 3.0.0
73
73
  - !ruby/object:Gem::Dependency
@@ -77,7 +77,7 @@ dependencies:
77
77
  - - ~>
78
78
  - !ruby/object:Gem::Version
79
79
  version: 2.44.0
80
- - - '>='
80
+ - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: 2.41.0
83
83
  type: :runtime
@@ -87,7 +87,7 @@ dependencies:
87
87
  - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: 2.44.0
90
- - - '>='
90
+ - - ! '>='
91
91
  - !ruby/object:Gem::Version
92
92
  version: 2.41.0
93
93
  description: Mobile and Web apps automation framework using Appium, Selenium and Cucumber
@@ -109,6 +109,8 @@ files:
109
109
  - features/support/env.rb
110
110
  - features/support/support_code.rb
111
111
  - lib/applenium.rb
112
+ - lib/applenium/assertions.rb
113
+ - lib/applenium/browser_actions.rb
112
114
  - lib/applenium/mobile/mobile_methods.rb
113
115
  - lib/applenium/mobile/required_files.rb
114
116
  - lib/applenium/mobile_steps.rb
@@ -154,17 +156,17 @@ require_paths:
154
156
  - lib
155
157
  required_ruby_version: !ruby/object:Gem::Requirement
156
158
  requirements:
157
- - - '>='
159
+ - - ! '>='
158
160
  - !ruby/object:Gem::Version
159
161
  version: '0'
160
162
  required_rubygems_version: !ruby/object:Gem::Requirement
161
163
  requirements:
162
- - - '>='
164
+ - - ! '>='
163
165
  - !ruby/object:Gem::Version
164
166
  version: '0'
165
167
  requirements: []
166
168
  rubyforge_project:
167
- rubygems_version: 2.4.6
169
+ rubygems_version: 2.4.5
168
170
  signing_key:
169
171
  specification_version: 4
170
172
  summary: Appium and Selenium used with Ruby Cucumber