Ifd_Automation 2.7 → 2.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.
Files changed (52) hide show
  1. checksums.yaml +5 -5
  2. data/bin/Ifd_Automation +0 -0
  3. data/bin/console +0 -0
  4. data/bin/documentation_generator.rb +0 -0
  5. data/bin/generate.rb +0 -0
  6. data/bin/helper.rb +0 -0
  7. data/bin/setup +0 -0
  8. data/lib/Ifd_Automation.rb +0 -0
  9. data/{project/features/step_definitions/IFD_Libraries → lib/Ifd_Automation}/REST_steps.rb +0 -0
  10. data/{project/features/step_definitions/IFD_Libraries → lib/Ifd_Automation}/SOAP_steps.rb +0 -0
  11. data/lib/Ifd_Automation/all_steps.rb +0 -0
  12. data/{project/features/step_definitions/IFD_Libraries → lib/Ifd_Automation}/database_steps.rb +0 -0
  13. data/{project/features/step_definitions/IFD_Libraries → lib/Ifd_Automation}/dynamic_store_value_steps.rb +0 -0
  14. data/{project/features/step_definitions/IFD_Libraries → lib/Ifd_Automation}/email_steps.rb +0 -0
  15. data/{project/features/step_definitions/IFD_Libraries → lib/Ifd_Automation}/file_steps.rb +0 -0
  16. data/lib/Ifd_Automation/require_libs.rb +0 -0
  17. data/{project/features/step_definitions/IFD_Libraries → lib/Ifd_Automation}/ssh_steps.rb +0 -0
  18. data/lib/Ifd_Automation/version.rb +1 -1
  19. data/lib/Ifd_Automation/web_steps.rb +84 -0
  20. data/lib/helper/assertion_helper.rb +0 -0
  21. data/lib/helper/auto_util.rb +0 -0
  22. data/lib/helper/database_helper.rb +1 -1
  23. data/lib/helper/file_helper.rb +0 -0
  24. data/lib/helper/mail_helper.rb +0 -0
  25. data/lib/helper/rest_helper.rb +0 -0
  26. data/lib/helper/soap_helper.rb +0 -0
  27. data/lib/helper/ssh_helper.rb +0 -0
  28. data/lib/helper/web_steps_helper.rb +26 -43
  29. data/project/Dockerfile +0 -0
  30. data/project/Gemfile +0 -0
  31. data/project/README.md +5 -21
  32. data/project/cucumber.yml +3 -3
  33. data/project/docker-compose.yml +0 -0
  34. data/project/features/Screenshot/sample.jpg +0 -0
  35. data/project/features/TestData/globalData.yml +0 -0
  36. data/project/features/TestSuite/WebGUI.feature +4 -17
  37. data/project/features/pre-defined-steps/database_steps.md +11 -0
  38. data/project/features/pre-defined-steps/dynamic_value_steps.md +7 -0
  39. data/project/features/pre-defined-steps/email_steps.md +4 -0
  40. data/project/features/pre-defined-steps/file_steps.md +5 -0
  41. data/project/features/pre-defined-steps/rest_steps.md +9 -0
  42. data/project/features/pre-defined-steps/soap_steps.md +8 -0
  43. data/project/features/pre-defined-steps/ssh_steps.md +7 -0
  44. data/project/features/pre-defined-steps/web_steps.md +24 -0
  45. data/project/features/step_definitions/lib_steps/actionwords.rb +18 -11
  46. data/project/features/step_definitions/lib_steps/steps.rb +10 -2
  47. data/project/features/step_definitions/repositories/project_object.yml +6 -1
  48. data/project/features/support/env.rb +0 -0
  49. data/project/features/support/hooks.rb +0 -0
  50. metadata +19 -32
  51. data/project/Gemfile.lock +0 -176
  52. data/project/features/step_definitions/IFD_Libraries/web_steps.rb +0 -89
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 448bca8ed2c82ab7bdfed43ec4abdd4a98b5d1c6
4
- data.tar.gz: a710f31d2495e1a69074b643e452f674435ab7e3
2
+ SHA256:
3
+ metadata.gz: f2d70b22752d7799f95d20fb516cbb2ef18fed586b7e68d458108cdf0b00504c
4
+ data.tar.gz: a3a46f8268032053889e83da5d9cf5f6bf7b18ebca30ceaf6253d57eb89e66b5
5
5
  SHA512:
6
- metadata.gz: cd25a2035bf56ce7270ab46a922384dc99c6dbc4dcc647c675812c9f989d9ec4698053a0b604e6b3619ba8262ed0e56b8d92959f6d2aa114c70836efe418e369
7
- data.tar.gz: 140494a94643f479dd4bf4959de923948587078117bb693c9ce54e8cf9f11fa86c00aa8ed4760a463abb7d7fe30d60b5e94470cfdfd93fe87453533a9622f90a
6
+ metadata.gz: 483e6dc26d00a739d47cb6b6bdf8acf09d0aeae6c8f9bd8c9ad4fdb4e8a4071612280e1218dd790914bfae1095c3d17c4bc0ffc75d391a2c36f1627f0d527c16
7
+ data.tar.gz: bd318d0452375a1468197d59bd98cbf8f741b27f782e4dba946a33ef33e42eb9261574a1609cda1280cea1f6d7bb1041be9e00c67108d9e303e87eb5a687f939
data/bin/Ifd_Automation CHANGED
File without changes
data/bin/console CHANGED
File without changes
File without changes
data/bin/generate.rb CHANGED
File without changes
data/bin/helper.rb CHANGED
File without changes
data/bin/setup CHANGED
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module IfdAutomation
2
- VERSION = "2.7"
2
+ VERSION = "2.8"
3
3
  end
@@ -0,0 +1,84 @@
1
+ Given /I am on the "(.*?)" page/ do |url|
2
+ url = Utils.check_dynamic_value(url)
3
+ execute_openbrowser(url)
4
+ end
5
+
6
+ When /I wait for (\d+) seconds/ do |second|
7
+ sleep(second.to_i)
8
+ end
9
+
10
+ And /I click on "(.*?)"/ do |object|
11
+ execute_click(object)
12
+ end
13
+
14
+ Then /I double click on "(.*?)"/ do |element|
15
+ double_click(element)
16
+ end
17
+
18
+ And /I set text on "(.*?)" with "(.*?)"/ do |object, text|
19
+ text = Utils.check_dynamic_value text
20
+ execute_settext(object, text)
21
+ end
22
+
23
+ And /I select option on "(.*?)" with "(.*?)"/ do |object, text|
24
+ execute_select(object, text)
25
+ end
26
+
27
+ Then /I maximize browser window/ do
28
+ maximize_browser
29
+ end
30
+
31
+ Then /I capture a screenshot as "(.*)"/ do |name|
32
+ file_path = $test_data_dir + name.downcase
33
+ page.save_screenshot(file_path)
34
+ end
35
+
36
+ Then /I switch to window having title "(.*?)"/ do |window_title|
37
+ switch_to_window_by_title window_title
38
+ end
39
+
40
+ Then /I scroll to (top|end) of page/ do |to|
41
+ scroll_page(to)
42
+ end
43
+
44
+ Then /I check property "(.*?)" with "(.*?)" has( | not)? value "(.*?)"/ do |object, property, negate, value|
45
+ value = Utils.bind_with_dyn_vars value
46
+ execute_checkproperty(object, property, negate, value)
47
+ end
48
+
49
+ Then /I should see text alert "(.*?)"/ do |actual_value|
50
+ check_alert_text(actual_value)
51
+ end
52
+
53
+ Given /I move mouse to element "(.*)" and click/ do |object|
54
+ execute_mousehoverandclick(object)
55
+ end
56
+
57
+ And /I remove attribute "(.*)" on object "(.*)"/ do |attr, object|
58
+ remove_element_attribute object, attr
59
+ end
60
+
61
+ And /I set state on "(.*?)" with "(.*?)"/ do |object, state|
62
+ execute_setstate(object, state)
63
+ end
64
+
65
+ And /browser window is re-sized to width "(.*)" and height "(.*)"/ do |x,y|
66
+ resize_window_screen(x,y)
67
+ end
68
+
69
+ And /I verify object "(.*)" with "(.*)" has value "(.*)"/ do |object,style,expected_value|
70
+ actual_value = get_computed_style(object,style)
71
+ IFD_Assertion.assert_string_equal(expected_value,actual_value)
72
+ end
73
+
74
+ Then /I should( not)? see page title "(.*)"/ do |present, title|
75
+ check_title(title, present.empty?)
76
+ end
77
+
78
+ And /I move mouse to element "(.*)" and choose item "(.*)" then click/ do |var, element|
79
+ movemouseandclick(var, element)
80
+ end
81
+
82
+ And /I hold element "(.*)" and move from location x "(.*)" to y "(.*)"$/ do |el, x, y|
83
+ drag_drop el, x, y
84
+ end
File without changes
File without changes
@@ -1,4 +1,4 @@
1
- require 'tiny_tds'
1
+ # require 'tiny_tds'
2
2
  require 'activerecord-sqlserver-adapter'
3
3
  require 'active_record'
4
4
 
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -68,15 +68,17 @@ require 'net/https'
68
68
 
69
69
  def switch_to_window_by_title(window_title)
70
70
  $previous_window = page.driver.browser.window_handle
71
- window_found = false
71
+ @window_found = false
72
72
  page.driver.browser.window_handles.each { |handle|
73
73
  page.driver.browser.switch_to.window handle
74
74
  if page.title == window_title
75
- window_found = true
75
+ @window_found = true
76
76
  break
77
77
  end
78
78
  }
79
- raise "Window having title \"#{window_title}\" not found" if not window_found
79
+ if @window_found == false
80
+ raise "Window having title \"#{window_title}\" not found"
81
+ end
80
82
  end
81
83
 
82
84
  def scroll_page(to)
@@ -198,6 +200,7 @@ require 'net/https'
198
200
  end
199
201
 
200
202
  def execute_checkproperty(element, property, negate, value, isSpecialChar=false)
203
+ validate_option_by(property)
201
204
  Capybara.configure do |config|
202
205
  config.ignore_hidden_elements = false
203
206
  end
@@ -211,52 +214,13 @@ require 'net/https'
211
214
  else
212
215
  # put_log "\n\n\t>>> execute_checkproperty: finish to found element"
213
216
  if foundElement != nil
217
+
214
218
  if property.upcase == 'VALUE'
215
219
  actual_value = foundElement.value()
216
220
 
217
221
  elsif property.upcase == 'TEXT'
218
222
  actual_value = foundElement.text()
219
223
 
220
- elsif property.upcase == 'SPECIAL CHAR'
221
- actual_value = foundElement.text()
222
- isSpecialChar = true
223
-
224
- elsif property.upcase == 'TAGNAME'
225
- actual_value = foundElement.tag_name()
226
-
227
- elsif property.upcase == 'STYLE'
228
- actual_value = foundElement[:style]
229
-
230
- elsif property.upcase == 'DISABLED'
231
- actual_value = foundElement[:disabled]
232
-
233
- elsif property.upcase == 'WIDTH'
234
- actual_value = foundElement[:width]
235
-
236
- elsif property.upcase == 'HEIGHT'
237
- actual_value = foundElement[:height]
238
-
239
- elsif property.upcase == 'ID'
240
- actual_value = foundElement[:id]
241
-
242
- elsif property.upcase == 'NAME'
243
- actual_value = foundElement[:name]
244
-
245
- elsif property.upcase == 'CLASS'
246
- actual_value = foundElement[:class]
247
-
248
- elsif property.upcase == 'HREF'
249
- actual_value = foundElement[:href]
250
-
251
- elsif property.upcase == 'TITLE'
252
- actual_value = foundElement[:title]
253
-
254
- elsif property.upcase == 'TYPE'
255
- actual_value = foundElement[:type]
256
-
257
- elsif property.upcase == 'CHECKED'
258
- actual_value = "true" if foundElement.checked? == true
259
- actual_value = "false" if foundElement.checked? == false
260
224
  else
261
225
  actual_value = foundElement["#{property}"]
262
226
  end
@@ -287,6 +251,15 @@ require 'net/https'
287
251
  end
288
252
  end
289
253
 
254
+ def check_valid_option_by?(option_by)
255
+ %w(text value).include? option_by
256
+ end
257
+
258
+ def validate_option_by(option_by)
259
+ raise "Please select valid option, invalid option - #{option_by}" unless check_valid_option_by? option_by
260
+ end
261
+
262
+
290
263
  def execute_gettext(element)
291
264
  foundElement = find_object(element)
292
265
  if foundElement != nil
@@ -445,3 +418,13 @@ def get_object_and_store_to_file(object,file_name)
445
418
  f << $text + "\n"
446
419
  end
447
420
  end
421
+
422
+ def drag_drop el, x, y
423
+ foundElement = page.driver.browser.find_element(css: "#{el}")
424
+ page.driver.browser.action.drag_and_drop_by(foundElement, x, y).perform
425
+ end
426
+
427
+ def movemouseandclick var, element
428
+ Selenium::WebDriver::Support::Select.new(page.driver.browser.find_element(:id, "#{var}")).select_by(:text, "#{element}")
429
+ page.driver.browser.find_element(:id, "#{var}").click
430
+ end
data/project/Dockerfile CHANGED
File without changes
data/project/Gemfile CHANGED
File without changes
data/project/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ###Ifd_Automation gem
2
2
  Ifd_Automation is an open-source tool for automating GUI, RESTful, SOAP, Database and eMail.
3
- Importantly, Ifd_Automation is "cross-platform": it allows you to write tests against multiple platforms (Linux, Windows, MacOS) on multiple browsers (chrome, firefox ...) using the same API.
3
+ Importantly, Ifd_Automation is cross-platform, it allows you to write tests against multiple platforms (Linux, Windows, MacOS) on multiple browsers (chrome, firefox ...) using the same API.
4
4
 
5
5
  ###Getting Started
6
6
  These instructions will get you a copy of the project up and running on your local machine for testing purposes. See deployment for notes on how to install Ifd_Automation gem
@@ -26,8 +26,10 @@ By default, the steps which relate to test data will be read/created from this f
26
26
  - TestSuite folder
27
27
  Place to store user's feature files.
28
28
 
29
+ - pre-defined-steps folder
30
+ All available steps from framework
31
+
29
32
  - Step_definitions folder
30
- - IFD_Libraries (contains custom Ifd_Automation steps)
31
33
  - lib_steps
32
34
  - actionword.rb
33
35
  - steps.rb
@@ -37,24 +39,6 @@ Place to store user's feature files.
37
39
  - support
38
40
  - env.rb
39
41
  - hook.rb
42
+
40
43
  ###Usage
41
44
  ####Available steps
42
- All available steps are located at IFD_Libaries folder, below are instructions show how to use these libraries
43
-
44
- ----
45
- #####web steps
46
- 1. Open browser and navigate to the page test page. The page address can be insert directly into step or using dynamic
47
- `Given I am on the "page_url" page`
48
- #####example
49
- - `Given I am on the "http://google.com" page`
50
- - `Given I am on the "params='test_page'" page`
51
-
52
- 2. Wait for number of seconds before doing the next step
53
- `And I wait for <number> seconds`
54
- #####example
55
- `And I wait for 5 seconds`
56
- 3. Click on an element
57
- `And I click on "string"`
58
- #####example
59
- `And I click on "button_login"`
60
-
data/project/cucumber.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  default: --no-source
2
- <% remote = "SELENIUM=remote" %>
3
- remote_chrome: BROWSER=chrome <%= remote %>
4
- remote_firefox: BROWSER=firefox <%= remote %>
2
+ remote: SELENIUM=remote
3
+ remote_chrome: BROWSER=chrome -p remote
4
+ remote_firefox: BROWSER=firefox -p remote
5
5
  junit_report: -f progress -f junit -o Report
6
6
  html_report: -f progress -f html -o Report
File without changes
File without changes
File without changes
@@ -1,18 +1,5 @@
1
- Feature: Example feature for GUI testingz
1
+ Feature: Jira ticket name
2
2
 
3
- Scenario: testing case for web interaction
4
- # Given I am on the "params='login_page'" page
5
- * I store string "test_code" as "$test"
6
- * I create xml file and store as string "$xml_soap":
7
- """
8
- <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
9
- <soap:Body>
10
- <UpdateSecret xmlns="urn:thesecretserver.com">
11
- <token><%= $test %></token>
12
- <secret></secret>
13
- </UpdateSecret>
14
- </soap:Body>
15
- </soap:Envelope>
16
- """
17
- * I print the value of "$xml_soap"
18
- * I send SOAP request with operation name "test_operation" and xml data "$xml_soap"
3
+ Scenario: login to system with valid account
4
+ Given I am on the "https://html5demos.com/drag" page
5
+ Given I drag object "test1" to "test2"
@@ -0,0 +1,11 @@
1
+ #Pre-defined Steps
2
+
3
+ I create connection to database with:
4
+ I close SQL connection
5
+ I run sql script "<string>"
6
+ I run sql script:
7
+ I run sql select query script:
8
+ show me the result of SQL statement
9
+ the result of SQL statement should be:
10
+ the result of SQL statement should have "<string>" with value "<string>"
11
+ I store the result of SQL script as ".*"
@@ -0,0 +1,7 @@
1
+ #Pre-defined Steps
2
+
3
+ I get text on "<string>" then store it as "<string>"
4
+ I store string "." as "."
5
+ I print the value of "<string>"
6
+ I get text on "." then store it into file "<string>"
7
+ I create xml file and store as string "<string>":
@@ -0,0 +1,4 @@
1
+ #Pre-defined Steps
2
+
3
+ I send an email with:
4
+ I should receive an email with:
@@ -0,0 +1,5 @@
1
+ #Pre-defined Steps
2
+
3
+ I delete test file "<string>"
4
+ I read data from file "<string>"
5
+ I execute file "<string>" from windows server "<string>"
@@ -0,0 +1,9 @@
1
+ #Pre-defined Steps
2
+
3
+ I set headers:
4
+ I send a REST GET|PUT|POST|DELETE request for|to "<string>" with the following:
5
+ I store the REST result at node "<string>" as "<string>"
6
+ I print the result of REST request
7
+ I should see REST response code "<string>"
8
+ the JSON response should be:
9
+ the JSON response at node "<string>" should have "<string>"
@@ -0,0 +1,8 @@
1
+ #Pre-defined Steps
2
+
3
+ I get SOAP operations list from '.'
4
+ I send SOAP request with operation name "<string>" and XML file "<string>"
5
+ I send SOAP request with operation name "<string>" and xml data "<string>"
6
+ the status code should be "<string>"
7
+ the SOAP response node should have "." with text "."
8
+ I print the SOAP response
@@ -0,0 +1,7 @@
1
+ #Pre-defined Steps
2
+
3
+ I SSH to "<string>" with the following credentials:
4
+ I run SSH command "<string>"
5
+ show me the SSH output result
6
+ I should see "<string>" in the SSH output
7
+ I store the result of SQL script as "."
@@ -0,0 +1,24 @@
1
+ #Pre-defined Steps
2
+
3
+ Given I am on the "page_url" page
4
+ And I wait for <number> seconds
5
+ And I click on "string"
6
+ And I double click on "string"
7
+ And I set text on "string" with "string"
8
+ And I capture a screenshot as "string"
9
+ And I switch to window having title "string"
10
+ And I scroll to top of page
11
+ And I scroll to end of page
12
+ I check property "element" with "value" has value "element value"
13
+ I check property "element" with "text" has value "element value"
14
+ I check property "element" with "value" has not value "element value"
15
+ I check property "element" with "text" has not value "element value"
16
+ I should see text alert "alert text"
17
+ I move mouse to element "element" and click
18
+ I remove attribute "attribute name" on object "object"
19
+ I set state on "elment" with "true"
20
+ I set state on "elment" with "false"
21
+ browser window is re-sized to width "width number" and height "height number"
22
+ I verify object "element" with "element attribute" has value "attribute value"
23
+ I should see page title "page title"
24
+ I should not see page title "page title"
@@ -1,16 +1,23 @@
1
1
  module Actionwords
2
2
 
3
- def login_to_system
4
- step %{I am on the "params='login_page'" page}
5
- step %{I set text on "textbox_username" with "params='login_user'"}
6
- step %{I set text on "textbox_password" with "params='login_pass'"}
7
- step %{I click on "aa"}
3
+ def login_to_system(page_url,user,pass)
4
+ step %{I am on the "#{page_url}" page}
5
+ step %{I set text on "textbox_username" with "#{user}"}
6
+ step %{I set text on "textbox_password" with "#{pass}"}
7
+ step %{I click on "login" button}
8
8
  end
9
- #
10
- # def send_soap_with_operation_and_data(operation,data)
11
- #
12
- # # @response = IFD_Soap.call_and_fail_gracefully(@SOAPclient, operation.downcase.to_sym, xml: Utils.eval_with_dyn_vars(data) )
13
- # p Utils.eval_with_dyn_vars(data)
14
- # end
9
+
10
+
11
+ def execute_drag_to_new_object from_element, element
12
+ found_from_element = find_object(from_element)
13
+ foundElement = find_object(element)
14
+ if foundElement != nil and found_from_element != nil
15
+ found_from_element.drag_to(foundElement)
16
+ end
17
+ end
18
+
19
+ def anh_123
20
+
21
+ end
15
22
 
16
23
  end
@@ -1,6 +1,14 @@
1
1
  require_relative 'actionwords'
2
2
  World(Actionwords)
3
3
 
4
- Given /I log in to the system/ do
5
- login_to_system
4
+ Given /I log in to page "(.*)" with user "(.*)" and pass "(.*)"/ do |page_url,user,pass|
5
+ login_to_system(page_url,user,pass)
6
+ end
7
+
8
+ And /^I drag object "(.*?)" to "(.*?)"$/ do |from_object, object|
9
+ execute_drag_to_new_object(from_object, object)
10
+ end
11
+
12
+ Given /anh/ do
13
+ anh
6
14
  end
@@ -1,2 +1,7 @@
1
1
  textbox_username: {css_selector: '#userField'}
2
- textbox_password: {css_selector: '#passwordField'}
2
+ textbox_password: {css_selector: '#passwordField'}
3
+ test1: {css_selector: '#two'}
4
+ test2: {css_selector: '#bin'}
5
+ {"textbox_username":"{\"css_selector\":\"#userField\"}"}
6
+ {"textbox_password":"{\"css_selector\":\"#passwordField\"}"}
7
+ {"test1":"{\"css_selector\":\"#two\"}"}
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Ifd_Automation
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.7'
4
+ version: '2.8'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anh Pham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-23 00:00:00.000000000 Z
11
+ date: 2019-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver
@@ -160,26 +160,6 @@ dependencies:
160
160
  - - '='
161
161
  - !ruby/object:Gem::Version
162
162
  version: 5.1.5
163
- - !ruby/object:Gem::Dependency
164
- name: tiny_tds
165
- requirement: !ruby/object:Gem::Requirement
166
- requirements:
167
- - - "~>"
168
- - !ruby/object:Gem::Version
169
- version: '2.1'
170
- - - ">="
171
- - !ruby/object:Gem::Version
172
- version: 2.1.1
173
- type: :runtime
174
- prerelease: false
175
- version_requirements: !ruby/object:Gem::Requirement
176
- requirements:
177
- - - "~>"
178
- - !ruby/object:Gem::Version
179
- version: '2.1'
180
- - - ">="
181
- - !ruby/object:Gem::Version
182
- version: 2.1.1
183
163
  - !ruby/object:Gem::Dependency
184
164
  name: activerecord-sqlserver-adapter
185
165
  requirement: !ruby/object:Gem::Requirement
@@ -256,9 +236,17 @@ files:
256
236
  - bin/helper.rb
257
237
  - bin/setup
258
238
  - lib/Ifd_Automation.rb
239
+ - lib/Ifd_Automation/REST_steps.rb
240
+ - lib/Ifd_Automation/SOAP_steps.rb
259
241
  - lib/Ifd_Automation/all_steps.rb
242
+ - lib/Ifd_Automation/database_steps.rb
243
+ - lib/Ifd_Automation/dynamic_store_value_steps.rb
244
+ - lib/Ifd_Automation/email_steps.rb
245
+ - lib/Ifd_Automation/file_steps.rb
260
246
  - lib/Ifd_Automation/require_libs.rb
247
+ - lib/Ifd_Automation/ssh_steps.rb
261
248
  - lib/Ifd_Automation/version.rb
249
+ - lib/Ifd_Automation/web_steps.rb
262
250
  - lib/helper/assertion_helper.rb
263
251
  - lib/helper/auto_util.rb
264
252
  - lib/helper/database_helper.rb
@@ -270,21 +258,20 @@ files:
270
258
  - lib/helper/web_steps_helper.rb
271
259
  - project/Dockerfile
272
260
  - project/Gemfile
273
- - project/Gemfile.lock
274
261
  - project/README.md
275
262
  - project/cucumber.yml
276
263
  - project/docker-compose.yml
277
264
  - project/features/Screenshot/sample.jpg
278
265
  - project/features/TestData/globalData.yml
279
266
  - project/features/TestSuite/WebGUI.feature
280
- - project/features/step_definitions/IFD_Libraries/REST_steps.rb
281
- - project/features/step_definitions/IFD_Libraries/SOAP_steps.rb
282
- - project/features/step_definitions/IFD_Libraries/database_steps.rb
283
- - project/features/step_definitions/IFD_Libraries/dynamic_store_value_steps.rb
284
- - project/features/step_definitions/IFD_Libraries/email_steps.rb
285
- - project/features/step_definitions/IFD_Libraries/file_steps.rb
286
- - project/features/step_definitions/IFD_Libraries/ssh_steps.rb
287
- - project/features/step_definitions/IFD_Libraries/web_steps.rb
267
+ - project/features/pre-defined-steps/database_steps.md
268
+ - project/features/pre-defined-steps/dynamic_value_steps.md
269
+ - project/features/pre-defined-steps/email_steps.md
270
+ - project/features/pre-defined-steps/file_steps.md
271
+ - project/features/pre-defined-steps/rest_steps.md
272
+ - project/features/pre-defined-steps/soap_steps.md
273
+ - project/features/pre-defined-steps/ssh_steps.md
274
+ - project/features/pre-defined-steps/web_steps.md
288
275
  - project/features/step_definitions/lib_steps/actionwords.rb
289
276
  - project/features/step_definitions/lib_steps/steps.rb
290
277
  - project/features/step_definitions/repositories/project_object.yml
@@ -310,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
297
  version: '0'
311
298
  requirements: []
312
299
  rubyforge_project:
313
- rubygems_version: 2.5.2
300
+ rubygems_version: 2.7.6
314
301
  signing_key:
315
302
  specification_version: 4
316
303
  summary: SELENIUM WEBDRIVER WITH RUBY & CUCUMBER
data/project/Gemfile.lock DELETED
@@ -1,176 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- Ifd_Automation (2.7)
5
- actionmailer (~> 5.1, >= 5.1.4)
6
- activerecord (= 5.1.5)
7
- activerecord-sqlserver-adapter (~> 5.1, >= 5.1.6)
8
- capybara (~> 2.7, >= 2.7.1)
9
- cucumber (~> 3.1)
10
- httparty (~> 0.15.6)
11
- jsonpath (~> 0.5.8)
12
- net-ssh (~> 3.2)
13
- parallel_tests (~> 2.7, >= 2.7.1)
14
- rspec (~> 3.7.0, >= 3.7.0)
15
- savon (~> 2.11, >= 2.11.1)
16
- selenium-webdriver (~> 3.6, >= 3.6.0)
17
- tiny_tds (~> 2.1, >= 2.1.1)
18
- actionmailer (5.1.5)
19
- actionpack (= 5.1.5)
20
- actionview (= 5.1.5)
21
- activejob (= 5.1.5)
22
- mail (~> 2.5, >= 2.5.4)
23
- rails-dom-testing (~> 2.0)
24
- actionpack (5.1.5)
25
- actionview (= 5.1.5)
26
- activesupport (= 5.1.5)
27
- rack (~> 2.0)
28
- rack-test (>= 0.6.3)
29
- rails-dom-testing (~> 2.0)
30
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
31
- actionview (5.1.5)
32
- activesupport (= 5.1.5)
33
- builder (~> 3.1)
34
- erubi (~> 1.4)
35
- rails-dom-testing (~> 2.0)
36
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
37
- activejob (5.1.5)
38
- activesupport (= 5.1.5)
39
- globalid (>= 0.3.6)
40
- activemodel (5.1.5)
41
- activesupport (= 5.1.5)
42
- activerecord (5.1.5)
43
- activemodel (= 5.1.5)
44
- activesupport (= 5.1.5)
45
- arel (~> 8.0)
46
- activerecord-sqlserver-adapter (5.1.6)
47
- activerecord (~> 5.1.0)
48
- tiny_tds
49
- activesupport (5.1.5)
50
- concurrent-ruby (~> 1.0, >= 1.0.2)
51
- i18n (~> 0.7)
52
- minitest (~> 5.1)
53
- tzinfo (~> 1.1)
54
- addressable (2.5.2)
55
- public_suffix (>= 2.0.2, < 4.0)
56
- akami (1.3.1)
57
- gyoku (>= 0.4.0)
58
- nokogiri
59
- arel (8.0.0)
60
- backports (3.11.3)
61
- builder (3.2.3)
62
- capybara (2.18.0)
63
- addressable
64
- mini_mime (>= 0.1.3)
65
- nokogiri (>= 1.3.3)
66
- rack (>= 1.0.0)
67
- rack-test (>= 0.5.4)
68
- xpath (>= 2.0, < 4.0)
69
- childprocess (0.9.0)
70
- ffi (~> 1.0, >= 1.0.11)
71
- concurrent-ruby (1.0.5)
72
- crass (1.0.4)
73
- cucumber (3.1.0)
74
- builder (>= 2.1.2)
75
- cucumber-core (~> 3.1.0)
76
- cucumber-expressions (~> 5.0.4)
77
- cucumber-wire (~> 0.0.1)
78
- diff-lcs (~> 1.3)
79
- gherkin (~> 5.0)
80
- multi_json (>= 1.7.5, < 2.0)
81
- multi_test (>= 0.1.2)
82
- cucumber-core (3.1.0)
83
- backports (>= 3.8.0)
84
- cucumber-tag_expressions (~> 1.1.0)
85
- gherkin (>= 5.0.0)
86
- cucumber-expressions (5.0.17)
87
- cucumber-tag_expressions (1.1.1)
88
- cucumber-wire (0.0.1)
89
- diff-lcs (1.3)
90
- erubi (1.7.1)
91
- ffi (1.9.23)
92
- gherkin (5.0.0)
93
- globalid (0.4.1)
94
- activesupport (>= 4.2.0)
95
- gyoku (1.3.1)
96
- builder (>= 2.1.2)
97
- httparty (0.15.7)
98
- multi_xml (>= 0.5.2)
99
- httpi (2.4.3)
100
- rack
101
- socksify
102
- i18n (0.9.5)
103
- concurrent-ruby (~> 1.0)
104
- jsonpath (0.5.8)
105
- multi_json
106
- loofah (2.2.2)
107
- crass (~> 1.0.2)
108
- nokogiri (>= 1.5.9)
109
- mail (2.7.0)
110
- mini_mime (>= 0.1.1)
111
- mini_mime (1.0.0)
112
- mini_portile2 (2.3.0)
113
- minitest (5.8.3)
114
- multi_json (1.13.1)
115
- multi_test (0.1.2)
116
- multi_xml (0.6.0)
117
- net-ssh (3.2.0)
118
- nokogiri (1.8.2)
119
- mini_portile2 (~> 2.3.0)
120
- nori (2.6.0)
121
- parallel (1.12.1)
122
- parallel_tests (2.21.3)
123
- parallel
124
- public_suffix (3.0.2)
125
- rack (2.0.4)
126
- rack-test (1.0.0)
127
- rack (>= 1.0, < 3)
128
- rails-dom-testing (2.0.3)
129
- activesupport (>= 4.2.0)
130
- nokogiri (>= 1.6)
131
- rails-html-sanitizer (1.0.4)
132
- loofah (~> 2.2, >= 2.2.2)
133
- rspec (3.7.0)
134
- rspec-core (~> 3.7.0)
135
- rspec-expectations (~> 3.7.0)
136
- rspec-mocks (~> 3.7.0)
137
- rspec-core (3.7.1)
138
- rspec-support (~> 3.7.0)
139
- rspec-expectations (3.7.0)
140
- diff-lcs (>= 1.2.0, < 2.0)
141
- rspec-support (~> 3.7.0)
142
- rspec-mocks (3.7.0)
143
- diff-lcs (>= 1.2.0, < 2.0)
144
- rspec-support (~> 3.7.0)
145
- rspec-support (3.7.1)
146
- rubyzip (1.2.1)
147
- savon (2.12.0)
148
- akami (~> 1.2)
149
- builder (>= 2.1.2)
150
- gyoku (~> 1.2)
151
- httpi (~> 2.3)
152
- nokogiri (>= 1.8.1)
153
- nori (~> 2.4)
154
- wasabi (~> 3.4)
155
- selenium-webdriver (3.11.0)
156
- childprocess (~> 0.5)
157
- rubyzip (~> 1.2)
158
- socksify (1.7.1)
159
- thread_safe (0.3.6)
160
- tiny_tds (2.1.1)
161
- tzinfo (1.2.5)
162
- thread_safe (~> 0.1)
163
- wasabi (3.5.0)
164
- httpi (~> 2.0)
165
- nokogiri (>= 1.4.2)
166
- xpath (3.0.0)
167
- nokogiri (~> 1.8)
168
-
169
- PLATFORMS
170
- ruby
171
-
172
- DEPENDENCIES
173
- Ifd_Automation
174
-
175
- BUNDLED WITH
176
- 1.13.6
@@ -1,89 +0,0 @@
1
-
2
- # Navigate to a particular page
3
- Given(/^I am on the "([^"]*)" page$/) do |url|
4
- url = Utils.check_dynamic_value(url)
5
- execute_openbrowser(url)
6
- end
7
-
8
- # # Wait for the specific time
9
- When /^I wait for (\d+) seconds$/ do |second|
10
- sleep(second.to_i)
11
- end
12
-
13
- # Finds a button or link by id, text or value and clicks it
14
- And /^I click on "([^\"]*)"$/ do |object|
15
- execute_click(object)
16
- end
17
-
18
- # double click on web element
19
- Then /^I double click on element "(.*?)"$/ do |element|
20
- double_click(element)
21
- end
22
-
23
- # Fill in a text box or text area with a value
24
- And /^I set text on "(.*?)" with "(.*?)"$/ do |object, text|
25
- text = Utils.check_dynamic_value text
26
- execute_settext(object, text)
27
- end
28
-
29
- # select option
30
- And /^I select option on "(.*?)" with "(.*?)"$/ do |object, text|
31
- execute_select(object, text)
32
- end
33
-
34
-
35
- # step to maximize browser
36
- Then(/^I maximize browser window$/) do
37
- maximize_browser
38
- end
39
-
40
- Then /^Capture a screenshot as "(.*)"$/ do |name|
41
- file_path = $test_data_dir + name.downcase
42
- page.save_screenshot(file_path)
43
- end
44
-
45
- Then(/^I switch to window having title "(.*?)"$/) do |window_title|
46
- switch_to_window_by_title window_title
47
- end
48
-
49
- # steps to scroll web page to top or end
50
- Then(/^I scroll to (top|end) of page$/) do |to|
51
- scroll_page(to)
52
- end
53
-
54
- # check property for object
55
- Then /^I check property "(.*?)" with "(.*?)" has( | not)? value "(.*?)"$/ do |object, property, negate, value|
56
- value = Utils.bind_with_dyn_vars value
57
- execute_checkproperty(object, property, negate, value)
58
- end
59
-
60
- # step to assert javascript pop-up alert text
61
- Then(/^I should see alert text as "(.*?)"$/) do |actual_value|
62
- check_alert_text(actual_value)
63
- end
64
-
65
- Given /^I move mouse to element "(.*)" and click$/ do |object|
66
- execute_mousehoverandclick(object)
67
- end
68
-
69
- And /^remove attribute "(.*)" on object "(.*)"$/ do |attr, object|
70
- remove_element_attribute object, attr
71
- end
72
-
73
- # set state for check box, combo box
74
- And /^I set state on "(.*?)" with "(.*?)"$/ do |object, state|
75
- execute_setstate(object, state)
76
- end
77
-
78
- And /I resize window screen to "(.*)","(.*)"/ do |x,y|
79
- resize_window_screen(x,y)
80
- end
81
-
82
- And /I verify object "(.*)" with "(.*)" has value "(.*)"/ do |object,style,expected_value|
83
- actual_value = get_computed_style(object,style)
84
- IFD_Assertion.assert_string_equal(expected_value,actual_value)
85
- end
86
-
87
- Then /^I should( not)? see page title as (.*)$/ do |present, title|
88
- check_title(title, present.empty?)
89
- end