itms_automation 2.6.1 → 2.6.2
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 +4 -4
- data/features-skeleton/Gemfile +3 -0
- data/features-skeleton/Gemfile.lock +63 -0
- data/features-skeleton/README.md +132 -0
- data/features-skeleton/cucumber.yml +4 -0
- data/features-skeleton/my_first.feature +9 -4
- data/lib/itms_automation/methods/assertion_methods.rb +10 -10
- data/lib/itms_automation/methods/click_elements_methods.rb +0 -1
- data/lib/itms_automation/version.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4feb41c4f5dd09900380546aff2b9631e24f56e0f71221f537ea430ed6bd0aa5
|
4
|
+
data.tar.gz: 40dbc3a2a3b1221a55801afc5718d196e1532be10cdba9273c7bd683f9d13b94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bb2b034e973e9672ac206c8a6f1105881e5b598874a727ff15560bc3b366d7b3e69b0d56312568f248191cb0cf0a538771a7b268c39001ec2963d2bc3188d48
|
7
|
+
data.tar.gz: 0767eab9e0c95a774932f66916a2316606006e420497a68e2793286dd501a683e74bedb4734f86b82dfc521ba96eea92ac29397f36858f1b936e8af0f6be72f1
|
@@ -0,0 +1,63 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
appium_lib_core (3.10.1)
|
5
|
+
faye-websocket (~> 0.10.0)
|
6
|
+
selenium-webdriver (~> 3.14, >= 3.14.1)
|
7
|
+
backports (3.18.1)
|
8
|
+
builder (3.2.4)
|
9
|
+
childprocess (3.0.0)
|
10
|
+
cucumber (3.1.2)
|
11
|
+
builder (>= 2.1.2)
|
12
|
+
cucumber-core (~> 3.2.0)
|
13
|
+
cucumber-expressions (~> 6.0.1)
|
14
|
+
cucumber-wire (~> 0.0.1)
|
15
|
+
diff-lcs (~> 1.3)
|
16
|
+
gherkin (~> 5.1.0)
|
17
|
+
multi_json (>= 1.7.5, < 2.0)
|
18
|
+
multi_test (>= 0.1.2)
|
19
|
+
cucumber-core (3.2.1)
|
20
|
+
backports (>= 3.8.0)
|
21
|
+
cucumber-tag_expressions (~> 1.1.0)
|
22
|
+
gherkin (~> 5.0)
|
23
|
+
cucumber-expressions (6.0.1)
|
24
|
+
cucumber-tag_expressions (1.1.1)
|
25
|
+
cucumber-wire (0.0.1)
|
26
|
+
diff-lcs (1.4.4)
|
27
|
+
eventmachine (1.2.7)
|
28
|
+
faye-websocket (0.10.9)
|
29
|
+
eventmachine (>= 0.12.0)
|
30
|
+
websocket-driver (>= 0.5.1)
|
31
|
+
gherkin (5.1.0)
|
32
|
+
httparty (0.13.7)
|
33
|
+
json (~> 1.8)
|
34
|
+
multi_xml (>= 0.5.2)
|
35
|
+
itms_automation (2.6.1)
|
36
|
+
appium_lib_core (~> 3.10.1, >= 3.10.1)
|
37
|
+
cucumber (~> 3.1.2, >= 3.1.2)
|
38
|
+
httparty (~> 0.13.7, >= 0.13.7)
|
39
|
+
report_builder (~> 1.8, >= 1.8)
|
40
|
+
selenium-webdriver (~> 3.14, >= 3.14.1)
|
41
|
+
json (1.8.6)
|
42
|
+
multi_json (1.14.1)
|
43
|
+
multi_test (0.1.2)
|
44
|
+
multi_xml (0.6.0)
|
45
|
+
report_builder (1.8)
|
46
|
+
json (>= 1.8.1)
|
47
|
+
rubyzip (2.3.0)
|
48
|
+
selenium-webdriver (3.142.7)
|
49
|
+
childprocess (>= 0.5, < 4.0)
|
50
|
+
rubyzip (>= 1.2.2)
|
51
|
+
websocket-driver (0.7.2)
|
52
|
+
websocket-extensions (>= 0.1.0)
|
53
|
+
websocket-extensions (0.1.5)
|
54
|
+
|
55
|
+
PLATFORMS
|
56
|
+
ruby
|
57
|
+
|
58
|
+
DEPENDENCIES
|
59
|
+
itms_automation
|
60
|
+
report_builder
|
61
|
+
|
62
|
+
BUNDLED WITH
|
63
|
+
2.0.2
|
@@ -0,0 +1,132 @@
|
|
1
|
+
Welcome to itms_automation
|
2
|
+
=================
|
3
|
+
|
4
|
+
itms_automation : Automation Tesing Using Ruby
|
5
|
+
|
6
|
+
itms_automation is a behavior driven development (BDD) approach to write automation test script to test Web and Android Apps.
|
7
|
+
It enables you to write and execute automated acceptance/unit tests.
|
8
|
+
It is cross-platform, open source and free.
|
9
|
+
Automate your test cases with minimal coding.
|
10
|
+
|
11
|
+
itms_automation Ruby API's
|
12
|
+
============================
|
13
|
+
|
14
|
+
If you are writing code for your custom steps you can use the following methods :
|
15
|
+
|
16
|
+
Note : For some of the API paramtere values are fixed. Such values for paramaters are mentioned below.
|
17
|
+
|
18
|
+
Navigation API's
|
19
|
+
----------------
|
20
|
+
|
21
|
+
navigate_to("link")
|
22
|
+
|
23
|
+
navigate(direction) # direction => "back" / "forward"
|
24
|
+
|
25
|
+
close_driver()
|
26
|
+
|
27
|
+
|
28
|
+
Browser Interaction API's
|
29
|
+
-------------------------
|
30
|
+
|
31
|
+
resize_browser(width, height)
|
32
|
+
|
33
|
+
scroll_page(to) # to => "top" / "end"
|
34
|
+
|
35
|
+
scroll_to_element(by, access_value)
|
36
|
+
|
37
|
+
zoom_in_out(in_out) # in_out => "add" / "subtract"
|
38
|
+
|
39
|
+
zoom_in_out_till_element_display(by, in_out, access_value) # in_out => "add" / "subtract"
|
40
|
+
|
41
|
+
|
42
|
+
Input API's
|
43
|
+
------------
|
44
|
+
|
45
|
+
click(element)
|
46
|
+
|
47
|
+
double_click(element)
|
48
|
+
|
49
|
+
click_forcefully(element)
|
50
|
+
|
51
|
+
enter_text(element, text)
|
52
|
+
|
53
|
+
clear_text(element)
|
54
|
+
|
55
|
+
check_checkbox(element)
|
56
|
+
|
57
|
+
uncheck_checkbox(element)
|
58
|
+
|
59
|
+
toggle_checkbox(element)
|
60
|
+
|
61
|
+
select_radio_button(element)
|
62
|
+
|
63
|
+
get_page_title()
|
64
|
+
|
65
|
+
get_element_text(element)
|
66
|
+
|
67
|
+
get_element_attribute(element, attribute)
|
68
|
+
|
69
|
+
is_element_enabled(element)
|
70
|
+
|
71
|
+
is_element_displayed(element)
|
72
|
+
|
73
|
+
hover_over_element(element)
|
74
|
+
|
75
|
+
by => "locators type" ("id", "name", "class", "xpath", "css")
|
76
|
+
|
77
|
+
access_value => "locator value"
|
78
|
+
|
79
|
+
|
80
|
+
Javascript Handling API
|
81
|
+
-----------------------
|
82
|
+
|
83
|
+
handle_alert(decision) # decision => "accept" / "dismiss"
|
84
|
+
|
85
|
+
get_alert_text
|
86
|
+
|
87
|
+
|
88
|
+
Progress API's
|
89
|
+
--------------
|
90
|
+
|
91
|
+
wait(time_in_sec)
|
92
|
+
|
93
|
+
wait_for_element_to_display(element, duration)
|
94
|
+
|
95
|
+
wait_for_element_to_enable(element, duration)
|
96
|
+
|
97
|
+
|
98
|
+
by => "locators type" ("id", "name", "class", "xpath", "css")
|
99
|
+
|
100
|
+
access_value => "locator value"
|
101
|
+
|
102
|
+
duration => duration in seconds.
|
103
|
+
|
104
|
+
|
105
|
+
Screenshot API
|
106
|
+
--------------
|
107
|
+
take_screenshots
|
108
|
+
|
109
|
+
|
110
|
+
Configuration API
|
111
|
+
-----------------
|
112
|
+
|
113
|
+
print_congifugartion
|
114
|
+
|
115
|
+
|
116
|
+
Usage: itms_automation <command-name> [parameters] [options]
|
117
|
+
|
118
|
+
<command-name> can be one of
|
119
|
+
help
|
120
|
+
gen
|
121
|
+
version
|
122
|
+
|
123
|
+
Commands:
|
124
|
+
help : prints more detailed help information.
|
125
|
+
|
126
|
+
gen : creates a skeleton features dir. This is usually used once when
|
127
|
+
setting up selnium-cucumber to ensure that the features folder contains
|
128
|
+
the right step definitions and environment to run with cucumber.
|
129
|
+
|
130
|
+
version : prints the gem version
|
131
|
+
|
132
|
+
Options: -v, --verbose Turns on verbose logging
|
@@ -1,5 +1,10 @@
|
|
1
|
-
Feature:
|
1
|
+
Feature: Addition
|
2
|
+
As a math idiot
|
3
|
+
In order to not feel silly
|
4
|
+
I add two numbers
|
2
5
|
|
3
|
-
Scenario:
|
4
|
-
|
5
|
-
|
6
|
+
Scenario: Adding a and b
|
7
|
+
Given I have variable a
|
8
|
+
And I have variable b
|
9
|
+
When I add a and b
|
10
|
+
Then I display the sum
|
@@ -50,16 +50,16 @@ end
|
|
50
50
|
# param 1 : String : Element
|
51
51
|
# param 2 : String : Expected element text
|
52
52
|
# param 3 : Boolean : test case [true or flase]
|
53
|
-
def check_element_text(element,
|
53
|
+
def check_element_text(element, expected_value, test_case)
|
54
54
|
element_text = get_element_text(element)
|
55
55
|
|
56
56
|
if test_case
|
57
|
-
if element_text !=
|
58
|
-
raise TestCaseFailed, "Text Not Matched. Actual Value :#{
|
57
|
+
if element_text != expected_value
|
58
|
+
raise TestCaseFailed, "Text Not Matched. Actual Value :#{expected_value}"
|
59
59
|
end
|
60
60
|
else
|
61
|
-
if element_text ==
|
62
|
-
raise TestCaseFailed, "Text Matched. Actual Value :#{
|
61
|
+
if element_text == expected_value
|
62
|
+
raise TestCaseFailed, "Text Matched. Actual Value :#{expected_value}"
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
@@ -68,16 +68,16 @@ end
|
|
68
68
|
# param 1 : String : Element
|
69
69
|
# param 2 : String : Expected element partial text
|
70
70
|
# param 3 : Boolean : test case [true or flase]
|
71
|
-
def check_element_partial_text(element,
|
71
|
+
def check_element_partial_text(element, expected_value, test_case)
|
72
72
|
element_text = get_element_text(element)
|
73
73
|
|
74
74
|
if test_case
|
75
|
-
if not element_text.include? "#{
|
76
|
-
raise TestCaseFailed, "Text Not Matched. Actual Value :#{
|
75
|
+
if not element_text.include? "#{expected_value}"
|
76
|
+
raise TestCaseFailed, "Text Not Matched. Actual Value :#{expected_value}"
|
77
77
|
end
|
78
78
|
else
|
79
|
-
if element_text.include? "#{
|
80
|
-
raise TestCaseFailed, "Text Matched. Actual Value :#{
|
79
|
+
if element_text.include? "#{expected_value}"
|
80
|
+
raise TestCaseFailed, "Text Matched. Actual Value :#{expected_value}"
|
81
81
|
end
|
82
82
|
end
|
83
83
|
end
|
@@ -13,7 +13,6 @@ def double_click(element)
|
|
13
13
|
$driver.action.double_click(found_element).perform
|
14
14
|
end
|
15
15
|
|
16
|
-
|
17
16
|
def long_press( element, duration)
|
18
17
|
found_element = WAIT.until { find_object(element) }
|
19
18
|
parameters = { "element" => "#{found_element}", "duration" => "#{duration}" }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itms_automation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- INFOdation
|
@@ -147,6 +147,10 @@ files:
|
|
147
147
|
- example/desktop web/desktop_web_gmail_login/features/step_definitions/custom_steps.rb
|
148
148
|
- example/desktop web/desktop_web_gmail_login/features/support/env.rb
|
149
149
|
- example/desktop web/desktop_web_gmail_login/features/support/hooks.rb
|
150
|
+
- features-skeleton/Gemfile
|
151
|
+
- features-skeleton/Gemfile.lock
|
152
|
+
- features-skeleton/README.md
|
153
|
+
- features-skeleton/cucumber.yml
|
150
154
|
- features-skeleton/my_first.feature
|
151
155
|
- features-skeleton/screenshots/test.png
|
152
156
|
- features-skeleton/step_definitions/custom_steps.rb
|