itms_automation 2.6.7 → 2.7.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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/doc/installation.md +1 -1
  3. data/features-skeleton/my_first.feature +19 -10
  4. data/features-skeleton/step_definitions/input_steps.rb +3 -3
  5. data/features-skeleton/step_definitions/my_first_steps.rb +14 -0
  6. data/features-skeleton/step_definitions/repositories/project_object.yml +1 -1
  7. data/features-skeleton/support/env.rb +17 -88
  8. data/lib/itms_automation/input_steps.rb +1 -1
  9. data/lib/itms_automation/methods/assertion_methods.rb +159 -174
  10. data/lib/itms_automation/methods/click_elements_methods.rb +13 -6
  11. data/lib/itms_automation/methods/condition_methods.rb +13 -0
  12. data/lib/itms_automation/methods/configuration_methods.rb +14 -7
  13. data/lib/itms_automation/methods/input_methods.rb +58 -15
  14. data/lib/itms_automation/methods/javascript_handling_methods.rb +1 -1
  15. data/lib/itms_automation/methods/misc_methods.rb +1 -2
  16. data/lib/itms_automation/methods/navigate_methods.rb +52 -45
  17. data/lib/itms_automation/methods/progress_methods.rb +73 -6
  18. data/lib/itms_automation/methods/store_methods.rb +36 -0
  19. data/lib/itms_automation/version.rb +1 -1
  20. metadata +40 -40
  21. data/example/android/android_app/android_app_calculator.zip +0 -0
  22. data/example/android/android_app/android_app_calculator/AndroidCalculator.apk +0 -0
  23. data/example/android/android_app/android_app_calculator/features/calculator.feature +0 -36
  24. data/example/android/android_app/android_app_calculator/features/my_first.feature +0 -13
  25. data/example/android/android_app/android_app_calculator/features/screenshots/test.png +0 -0
  26. data/example/android/android_app/android_app_calculator/features/step_definitions/custom_steps.rb +0 -5
  27. data/example/android/android_app/android_app_calculator/features/support/env.rb +0 -52
  28. data/example/android/android_app/android_app_calculator/features/support/hooks.rb +0 -26
  29. data/example/android/android_web/android_web_gmail_login.zip +0 -0
  30. data/example/android/android_web/android_web_gmail_login/features/gmail_login.feature +0 -12
  31. data/example/android/android_web/android_web_gmail_login/features/my_first.feature +0 -1
  32. data/example/android/android_web/android_web_gmail_login/features/screenshots/test.png +0 -0
  33. data/example/android/android_web/android_web_gmail_login/features/step_definitions/custom_steps.rb +0 -5
  34. data/example/android/android_web/android_web_gmail_login/features/support/env.rb +0 -51
  35. data/example/android/android_web/android_web_gmail_login/features/support/hooks.rb +0 -27
  36. data/example/desktop web/desktop_web_gmail_login.zip +0 -0
  37. data/example/desktop web/desktop_web_gmail_login/features/gmail_login.feature +0 -9
  38. data/example/desktop web/desktop_web_gmail_login/features/gmail_multi_login.feature +0 -21
  39. data/example/desktop web/desktop_web_gmail_login/features/my_first.feature +0 -1
  40. data/example/desktop web/desktop_web_gmail_login/features/screenshots/test.png +0 -0
  41. data/example/desktop web/desktop_web_gmail_login/features/step_definitions/custom_steps.rb +0 -5
  42. data/example/desktop web/desktop_web_gmail_login/features/support/env.rb +0 -106
  43. data/example/desktop web/desktop_web_gmail_login/features/support/hooks.rb +0 -38
@@ -1,9 +0,0 @@
1
- Feature: Gmail_login
2
-
3
- Scenario: Valid_gmail_login
4
- Given I navigate to "http://www.gmail.com"
5
- And I enter "abc@gmail.com" into input field having id "Email"
6
- And I enter "!password*" into input field having id "Passwd"
7
- When I click on element having id "signIn"
8
- And I wait for 10 sec
9
- Then I close browser
@@ -1,21 +0,0 @@
1
- Feature: Gmail_login
2
-
3
- Scenario: Open gmail
4
- Given I navigate to "http://www.gmail.com"
5
-
6
- Scenario Outline: In-valid Login
7
- Then I clear input field having id "Email"
8
- And I enter <username> into input field having id "Email"
9
- Then I clear input field having id "Passwd"
10
- And I enter <password> into input field having id "Passwd"
11
- When I click on element having id "signIn"
12
- Then element having id "errormsg_0_Passwd" should be present
13
-
14
- Examples:
15
- | username | password |
16
- |"test1" |"password1" |
17
- |"test2" |"password2" |
18
- |"test3" |"password3" |
19
-
20
- Scenario: close gmail
21
- Then I close browser
@@ -1,5 +0,0 @@
1
- require 'itms_automation'
2
-
3
- # Do Not Remove This File
4
- # Add your custom steps here
5
- # $driver is instance of webdriver use this instance to write your custom code
@@ -1,106 +0,0 @@
1
- require 'rubygems'
2
- # require 'itms_automation'
3
- require_relative '../../../lib/itms_automation.rb'
4
- # require 'appium_lib'
5
- require 'appium_lib_core'
6
- # Store command line arguments
7
- $browser_type = ENV['BROWSER'] || 'firefox'
8
- $platform = ENV['PLATFORM'] || 'desktop'
9
- $os_version = ENV['OS_VERSION']
10
- $device_name = ENV['DEVICE_NAME']
11
- $udid = ENV['UDID']
12
- $app_path = ENV['APP_PATH']
13
-
14
- # check for valid parameters
15
- validate_parameters $platform, $browser_type, $app_path
16
-
17
- # If platform is android or ios create driver instance for mobile browser
18
- if $platform == 'android' or $platform == 'iOS'
19
-
20
- if $browser_type == 'native'
21
- $browser_type = "Browser"
22
- end
23
-
24
- if $platform == 'android'
25
- $device_name, $os_version = get_device_info
26
- end
27
-
28
- # desired_caps = {
29
- # caps: {
30
- # platformName: $platform,
31
- # browserName: $browser_type,
32
- # versionNumber: $os_version,
33
- # deviceName: $device_name,
34
- # udid: $udid,
35
- # app: ".//#{$app_path}"
36
- # }
37
- # }
38
- # appium_url = 'http://localhost:4723/wd/hub'
39
- # opts = {
40
- # desired_capabilities: { # or { caps: {....} }
41
- # platformName: :android,
42
- # deviceName: 'Android Simulator',
43
- # app: "WikipediaSample.apk"
44
- # },
45
- # appium_lib: {
46
- # wait: 30
47
- # }
48
- # }
49
-
50
- opts = {
51
- desired_capabilities: { # or { caps: {....} }
52
- platformName: $platform,
53
- browserName: $browser_type,
54
- deviceName: $device_name,
55
- versionNumber: $os_version,
56
- app: "WikipediaSample.apk"
57
- },
58
- appium_lib: {
59
- wait: 30
60
- }
61
- }
62
-
63
- begin
64
- # $driver = Appium::Driver.new(desired_caps, url: appium_url).start_driver
65
-
66
- # $driver = Selenium::WebDriver.for(:remote, :url => appium_url, :desired_capabilities => desired_caps)
67
- @core = Appium::Core.for(opts) # create a core driver with `opts`
68
- $driver = @core.start_driver
69
-
70
- rescue Exception => e
71
- puts e.message
72
- Process.exit(0)
73
- end
74
- else # else create driver instance for desktop browser
75
- begin
76
- $driver = case $browser_type
77
- when "chrome"
78
- Selenium::WebDriver.for(:chrome)
79
- when "safari"
80
- Selenium::WebDriver.for(:safari)
81
- when "internet_explorer"
82
- Selenium::WebDriver.for(:internet_explorer)
83
- when "chrome_headless"
84
- Selenium::WebDriver.for(:chrome, :desired_capabilities => Selenium::WebDriver::Remote::Capabilities.chrome(chromeOptions: { args: %w(headless) }))
85
- when "remote"
86
- if ENV['SERVER_URL'].nil? || ENV['REMOTE_BROWSER'].nil?
87
- puts "\nMissing SERVER_URL : SERVER_URL=http//SERVER_URL:4444/wd/hub"
88
- puts "\nMissing REMOTE_BROWSER: REMOTE_BROWSER=browser_name"
89
- Process.exit(0)
90
- else
91
- caps = Selenium::WebDriver::Remote::Capabilities.new
92
- caps["browserName"] = ENV['REMOTE_BROWSER']
93
- Selenium::WebDriver.for(:remote, :url => ENV['SERVER_URL'], :desired_capabilities => caps)
94
- end
95
-
96
- else
97
- Selenium::WebDriver.for(:firefox)
98
- end
99
- $driver.manage().window().maximize()
100
- p "session_id: #{$driver.session_id}"
101
- rescue Exception => e
102
- puts e.message
103
- Process.exit(0)
104
- end
105
- end
106
-
@@ -1,38 +0,0 @@
1
- def validate_params_exist
2
- raise "❌ ERROR: Missing param SERVER_URL." if ENV['SERVER_URL'].nil?
3
- raise "❌ ERROR: Missing param BROWSER." if ENV['BROWSER'].nil?
4
- if ENV['REPORT']
5
- raise "❌ ERROR: Missing param TESTSUITE." if ENV['TESTSUITE'].nil?
6
- raise "❌ ERROR: Missing param TESTCASE_REPORT_NAME." if ENV['TESTCASE_REPORT_NAME'].nil?
7
- $report_path = "Reports/#{ENV['TESTSUITE']}"
8
- $testcase_report_name = ENV['TESTCASE_REPORT_NAME']
9
- end
10
- end
11
-
12
- at_exit do
13
- # quite driver
14
- $driver.close()
15
- if ENV['REPORT']
16
- begin
17
- # validateReport
18
- time = Time.now.getutc
19
- ReportBuilder.configure do |config|
20
- config.report_path = "#{$report_path}/#{$testcase_report_name}"
21
- config.input_path = "#{$report_path}/#{$testcase_report_name}.json"
22
- config.report_types = [:json, :html]
23
- config.color = 'blue'
24
- config.additional_info = {
25
- 'Browser' => $browser_type,
26
- 'Platform' => $platform ,
27
- 'OS Version' => $os_version,
28
- 'Report Generated' => time
29
- }
30
- end
31
- options = { report_title: "INFODation - Test Management System" }
32
- ReportBuilder.build_report options
33
- rescue Exception => e
34
- puts e.message
35
- Process.exit( 0 )
36
- end
37
- end
38
- end