awetestlib 0.1.28 → 0.1.29pre1

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 (82) hide show
  1. data/.gitattributes +22 -22
  2. data/.gitignore +69 -69
  3. data/.yardopts +7 -7
  4. data/README.md +108 -108
  5. data/awetestlib.gemspec +57 -57
  6. data/awetestlib.windows.gemspec +41 -41
  7. data/awetestlib_notes.txt +4 -4
  8. data/awetestlib_osx.gemspec +47 -48
  9. data/bin/awetestlib +99 -99
  10. data/bin/awetestlib-android-setup.rb +26 -26
  11. data/bin/awetestlib-cucumber-setup.rb +28 -28
  12. data/bin/awetestlib-driver-setup.rb +21 -21
  13. data/bin/awetestlib-helpers.rb +41 -41
  14. data/bin/awetestlib-mobile-app-setup.rb +31 -31
  15. data/bin/awetestlib-netbeans-setup.rb +58 -58
  16. data/bin/awetestlib-regression-setup.rb +15 -15
  17. data/bin/awetestlib-rubymine-setup.rb +39 -39
  18. data/drivers/chromedriver.exe +0 -0
  19. data/ext/Rakefile +1 -1
  20. data/ext/mkrf_conf.rb +27 -27
  21. data/lib/awetestlib/html_report.rb +142 -142
  22. data/lib/awetestlib/logging.rb +366 -366
  23. data/lib/awetestlib/regression/browser.rb +1380 -1375
  24. data/lib/awetestlib/regression/drag_and_drop.rb +421 -420
  25. data/lib/awetestlib/regression/find.rb +345 -345
  26. data/lib/awetestlib/regression/legacy.rb +1187 -1187
  27. data/lib/awetestlib/regression/page_data.rb +191 -191
  28. data/lib/awetestlib/regression/runner.rb +307 -307
  29. data/lib/awetestlib/regression/tables.rb +627 -619
  30. data/lib/awetestlib/regression/user_input.rb +576 -576
  31. data/lib/awetestlib/regression/utilities.rb +1046 -988
  32. data/lib/awetestlib/regression/validations.rb +1093 -1074
  33. data/lib/awetestlib/regression/waits.rb +470 -470
  34. data/lib/awetestlib/runner.rb +18 -18
  35. data/lib/awetestlib.rb +41 -41
  36. data/lib/patches/README +2 -2
  37. data/lib/patches/firewatir.rb +106 -106
  38. data/lib/patches/watir.rb +175 -175
  39. data/lib/version.rb +2 -2
  40. data/license.txt +13 -13
  41. data/netbeans_setup.md +29 -29
  42. data/rdoc_test.bat +1 -1
  43. data/rubymine_setup.md +23 -23
  44. data/setup_samples/sample_android/features/dk.mejer.hansen.control.FlyingColorsPlayerAidActivity.apk +0 -0
  45. data/setup_samples/sample_android/features/sample_android.feature +5 -5
  46. data/setup_samples/sample_android/features/step_definitions/calabash_steps.rb +1 -1
  47. data/setup_samples/sample_android/features/support/app_installation_hooks.rb +36 -36
  48. data/setup_samples/sample_android/features/support/app_life_cycle_hooks.rb +14 -14
  49. data/setup_samples/sample_android/features/test_servers/8ba795a0288381ae346b67867b586881_0.3.2.apk +0 -0
  50. data/setup_samples/sample_cucumber/features/step_definitions/predefined_steps.rb +76 -76
  51. data/setup_samples/sample_cucumber/features/yahoo_mail.feature +11 -11
  52. data/setup_samples/sample_mobile_app/features/my_first.feature +14 -14
  53. data/setup_samples/sample_mobile_app/features/step_definitions/predefined_webview_steps.rb +80 -80
  54. data/setup_samples/sample_mobile_app/features/support/env.rb +2 -2
  55. data/setup_samples/sample_netbeans/demo.rb +86 -86
  56. data/setup_samples/sample_netbeans/nbproject/configs/Demo.properties +2 -2
  57. data/setup_samples/sample_netbeans/nbproject/private/config.properties +1 -1
  58. data/setup_samples/sample_netbeans/nbproject/private/configs/Demo.properties +2 -2
  59. data/setup_samples/sample_netbeans/nbproject/private/private.properties +2 -2
  60. data/setup_samples/sample_netbeans/nbproject/project.properties +5 -5
  61. data/setup_samples/sample_netbeans/nbproject/project.xml +13 -13
  62. data/setup_samples/sample_rubymine/.idea/encodings.xml +5 -5
  63. data/setup_samples/sample_rubymine/.idea/misc.xml +5 -5
  64. data/setup_samples/sample_rubymine/.idea/modules.xml +9 -9
  65. data/setup_samples/sample_rubymine/.idea/sample_rubymine.iml +9 -9
  66. data/setup_samples/sample_rubymine/.idea/scopes/scope_settings.xml +4 -4
  67. data/setup_samples/sample_rubymine/.idea/vcs.xml +7 -7
  68. data/setup_samples/sample_rubymine/.idea/workspace.xml +213 -213
  69. data/setup_samples/sample_rubymine/demo.rb +86 -86
  70. data/test/create_zoho.rb +66 -66
  71. data/test/create_zoho_account1.rb +68 -68
  72. data/test/create_zoho_account2.rb +72 -72
  73. data/test/demo.rb +87 -87
  74. data/test/google_search1.rb +16 -16
  75. data/test/google_search2.rb +19 -19
  76. data/test/login_1.rb +37 -37
  77. data/test/login_1a.rb +37 -37
  78. data/test/login_2.rb +32 -32
  79. data/test/zoho_exercise.rb +21 -21
  80. data/test/zoho_util.rb +487 -487
  81. data/tmp/placeholder.html +71 -71
  82. metadata +18 -49
@@ -1,48 +1,47 @@
1
- # -*- encoding: utf-8 -*-
2
- require "lib/version"
3
-
4
- Gem::Specification.new do |s|
5
-
6
- s.name = %q{awetestlib}
7
- s.version = Awetestlib::VERSION
8
- s.date = Awetestlib::VERSION_DATE
9
- s.platform = Gem::Platform::RUBY
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.authors = ["Anthony Woo", "Patrick Neve"]
13
- s.email = %q{patrick@3qilabs.com}
14
- s.summary = %q{Awetest DSL for automated testing of browser-based applications.}
15
- s.homepage = %q{http://3qilabs.com}
16
- s.description = %q{Awetest DSL for automated testing of browser-based applications.}
17
-
18
- s.add_dependency('watir-webdriver')
19
- #s.add_dependency('watir', '1.8.1')
20
- #s.add_dependency('commonwatir', '1.8.1')
21
- #s.add_dependency('firewatir', '1.8.1')
22
- s.add_dependency('activesupport', '~> 3.0.0')
23
- s.add_dependency('andand', '1.3.3')
24
- #s.add_dependency('watirloo')
25
- #s.add_dependency('win32-process')
26
- #s.add_dependency('win32screenshot')
27
- s.add_dependency('spreadsheet', '0.6.8')
28
- s.add_dependency('google-spreadsheet-ruby', '0.1.6')
29
- s.add_dependency('roo', '1.10.1')
30
- s.add_dependency('multipart-post', '1.1.4')
31
- s.add_dependency('selenium-webdriver')
32
- s.add_dependency('nokogiri')
33
- s.add_dependency('i18n')
34
- s.add_dependency('rb-appscript')
35
- s.add_dependency('json', '1.6.1') #for safari support
36
- s.add_dependency('pry')
37
- s.add_dependency('cucumber')
38
- s.add_dependency("gherkin", "2.11.5")
39
- s.add_dependency('calabash-cucumber')
40
- s.require_paths = ["lib"] #,"ext"]
41
- s.files = `git ls-files`.split("\n")
42
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
43
-
44
- #This line tells rubygems to look for an extension to install
45
- #s.extensions = ["ext\\mkrf_conf.rb"]
46
-
47
- end
48
-
1
+ # -*- encoding: utf-8 -*-
2
+ require "lib/version"
3
+
4
+ Gem::Specification.new do |s|
5
+
6
+ s.name = %q{awetestlib}
7
+ s.version = Awetestlib::VERSION
8
+ s.date = Awetestlib::VERSION_DATE
9
+ s.platform = Gem::Platform::RUBY
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.authors = ["Anthony Woo", "Patrick Neve"]
13
+ s.email = %q{patrick@3qilabs.com}
14
+ s.summary = %q{Awetest DSL for automated testing of browser-based applications.}
15
+ s.homepage = %q{http://3qilabs.com}
16
+ s.description = %q{Awetest DSL for automated testing of browser-based applications.}
17
+
18
+ s.add_dependency('watir-webdriver')
19
+ #s.add_dependency('watir', '1.8.1')
20
+ #s.add_dependency('commonwatir', '1.8.1')
21
+ #s.add_dependency('firewatir', '1.8.1')
22
+ s.add_dependency('activesupport', '~> 3.0.0')
23
+ s.add_dependency('andand')
24
+ #s.add_dependency('watirloo')
25
+ #s.add_dependency('win32-process')
26
+ #s.add_dependency('win32screenshot')
27
+ s.add_dependency('spreadsheet', '0.6.8')
28
+ s.add_dependency('google-spreadsheet-ruby', '0.1.6')
29
+ s.add_dependency('roo', '1.10.1')
30
+ s.add_dependency('multipart-post', '1.1.4')
31
+ s.add_dependency('selenium-webdriver')
32
+ s.add_dependency('nokogiri')
33
+ s.add_dependency('i18n')
34
+ s.add_dependency('rb-appscript')
35
+ #s.add_dependency('json', '1.6.1') #for safari support
36
+ s.add_dependency('pry')
37
+ s.add_dependency('cucumber')
38
+ s.add_dependency('calabash-cucumber')
39
+ s.require_paths = ["lib"] #,"ext"]
40
+ s.files = `git ls-files`.split("\n")
41
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
42
+
43
+ #This line tells rubygems to look for an extension to install
44
+ #s.extensions = ["ext\\mkrf_conf.rb"]
45
+
46
+ end
47
+
data/bin/awetestlib CHANGED
@@ -1,99 +1,99 @@
1
- $: << "./lib"
2
- require File.join(File.dirname(__FILE__),"awetestlib-helpers")
3
- require 'fileutils'
4
-
5
- cmd = ARGV[0]
6
-
7
- if cmd.nil?
8
- print_usage
9
-
10
- elsif cmd == "regression_setup"
11
- require File.join(File.dirname(__FILE__),"awetestlib-regression-setup")
12
- awetestlib_regression_setup
13
- elsif cmd == "rubymine_setup"
14
- require File.join(File.dirname(__FILE__),"awetestlib-rubymine-setup")
15
- awetestlib_rubymine_setup
16
- elsif cmd == "netbeans_setup"
17
- require File.join(File.dirname(__FILE__),"awetestlib-netbeans-setup")
18
- awetestlib_netbeans_setup
19
- elsif cmd == 'cucumber_setup'
20
- require File.join(File.dirname(__FILE__),"awetestlib-cucumber-setup")
21
- awetestlib_cucumber_setup
22
- elsif cmd == 'mobile_app_setup'
23
- require File.join(File.dirname(__FILE__),"awetestlib-mobile-app-setup")
24
- awetestlib_mobile_app_setup
25
- elsif cmd == 'android_setup'
26
- require File.join(File.dirname(__FILE__),"awetestlib-android-setup")
27
- awetestlib_android_setup
28
- elsif cmd == 'driver_setup'
29
- require File.join(File.dirname(__FILE__),"awetestlib-driver-setup")
30
- awetestlib_driver_setup
31
- else
32
-
33
- require 'optparse'
34
- require 'awetestlib'
35
-
36
- options = { }
37
- OptionParser.new do |opts|
38
- opts.banner = "Usage: awetestlib <script_file> [options]"
39
-
40
- opts.on("-m RUN_MODE", "--run_mode RUN_MODE", "Specify the run mode: local, local_zip, remote_zip") do |run_mode|
41
- options[:run_mode] = run_mode
42
- end
43
- opts.on("-r ROOT_PATH", "--root_path ROOT_PATH", "Specify the root path") do |root_path|
44
- options[:root_path] = root_path
45
- end
46
- opts.on("-l LIBRARY", "--library LIBRARY", "Specify a library to be loaded") do |library|
47
- options[:library] = library.to_s
48
- end
49
- opts.on("-x EXCEL_FILE", "--excel EXCEL_FILE", "Specify an excel file containing variables to be loaded") do |xls_path|
50
- options[:xls_path] = xls_path
51
- end
52
- opts.on("-b BROWSER", "--browser BROWSER", "Specify a browser (IE, FF, S, C)") do |browser|
53
- options[:browser] = browser
54
- end
55
- opts.on("-v VERSION", "--version VERSION", "Specify a browser version") do |v|
56
- options[:version] = v
57
- end
58
- opts.on("-e", "--environment_url ENVIRONMENT_URL", "Specify the environment URL") do |environment_url|
59
- options[:environment_url] = environment_url
60
- end
61
- opts.on("-f", "--environment_node_name ENVIRONMENT_NODENAME", "Specify the environment node name") do |node_name|
62
- options[:environment_nodename] = node_name
63
- end
64
- opts.on("-n", "--environment_name ENVIRONMENT_NAME", "Specify the environment name") do |environment_name|
65
- options[:environment_name] = environment_name
66
- end
67
- opts.on("-u SELENIUM_REMOTE_URL", "--selenium_remote_url SELENIUM_REMOTE_URL", "Specify the device's remote url and port") do |remote_url|
68
- options[:remote_url] = remote_url
69
- end
70
- opts.on("-s SCREENCAP_PATH", "--screencap-path SCREENCAP_PATH", "Specify the path where screenshots will be saved") do |screencap_path|
71
- options[:screencap_path] = screencap_path
72
- end
73
- opts.on("-d", "--debug", "Run debugger on first script failure") do
74
- options[:debug_on_fail] = true
75
- end
76
- # add persistent logging for awetestlib. pmn 05jun2012
77
- opts.on("-o", "--output_to_log", "Write to log file") do
78
- options[:output_to_log] = true
79
- end
80
- opts.on("", "--log_path_subdir LOG_PATH_SUBDIR", "Specify log path relative to root_path.") do |log_path_subdir|
81
- options[:log_path_subdir] = log_path_subdir
82
- end
83
- opts.on("", "--report_all_test_refs REPORT_ALL_TEST_REFS", "Include list of all error/test case reference ids actually validated.") do
84
- options[:report_all_test_refs] = true
85
- end
86
-
87
- end.parse!
88
-
89
- options[:environment] ||= {}
90
- options[:environment]["name"] = options[:environment_name]
91
- options[:environment]["url"] = options[:environment_url]
92
- options[:environment]["nodename"] = options[:environment_nodename]
93
- check_script_type(options)
94
-
95
- IS_WIN_2008 = File.exists?("config/win2008.txt")
96
- Awetestlib::Runner.new(options)
97
-
98
-
99
- end
1
+ $: << "./lib"
2
+ require File.join(File.dirname(__FILE__),"awetestlib-helpers")
3
+ require 'fileutils'
4
+
5
+ cmd = ARGV[0]
6
+
7
+ if cmd.nil?
8
+ print_usage
9
+
10
+ elsif cmd == "regression_setup"
11
+ require File.join(File.dirname(__FILE__),"awetestlib-regression-setup")
12
+ awetestlib_regression_setup
13
+ elsif cmd == "rubymine_setup"
14
+ require File.join(File.dirname(__FILE__),"awetestlib-rubymine-setup")
15
+ awetestlib_rubymine_setup
16
+ elsif cmd == "netbeans_setup"
17
+ require File.join(File.dirname(__FILE__),"awetestlib-netbeans-setup")
18
+ awetestlib_netbeans_setup
19
+ elsif cmd == 'cucumber_setup'
20
+ require File.join(File.dirname(__FILE__),"awetestlib-cucumber-setup")
21
+ awetestlib_cucumber_setup
22
+ elsif cmd == 'mobile_app_setup'
23
+ require File.join(File.dirname(__FILE__),"awetestlib-mobile-app-setup")
24
+ awetestlib_mobile_app_setup
25
+ elsif cmd == 'android_setup'
26
+ require File.join(File.dirname(__FILE__),"awetestlib-android-setup")
27
+ awetestlib_android_setup
28
+ elsif cmd == 'driver_setup'
29
+ require File.join(File.dirname(__FILE__),"awetestlib-driver-setup")
30
+ awetestlib_driver_setup
31
+ else
32
+
33
+ require 'optparse'
34
+ require 'awetestlib'
35
+
36
+ options = { }
37
+ OptionParser.new do |opts|
38
+ opts.banner = "Usage: awetestlib <script_file> [options]"
39
+
40
+ opts.on("-m RUN_MODE", "--run_mode RUN_MODE", "Specify the run mode: local, local_zip, remote_zip") do |run_mode|
41
+ options[:run_mode] = run_mode
42
+ end
43
+ opts.on("-r ROOT_PATH", "--root_path ROOT_PATH", "Specify the root path") do |root_path|
44
+ options[:root_path] = root_path
45
+ end
46
+ opts.on("-l LIBRARY", "--library LIBRARY", "Specify a library to be loaded") do |library|
47
+ options[:library] = library.to_s
48
+ end
49
+ opts.on("-x EXCEL_FILE", "--excel EXCEL_FILE", "Specify an excel file containing variables to be loaded") do |xls_path|
50
+ options[:xls_path] = xls_path
51
+ end
52
+ opts.on("-b BROWSER", "--browser BROWSER", "Specify a browser (IE, FF, S, C)") do |browser|
53
+ options[:browser] = browser
54
+ end
55
+ opts.on("-v VERSION", "--version VERSION", "Specify a browser version") do |v|
56
+ options[:version] = v
57
+ end
58
+ opts.on("-e", "--environment_url ENVIRONMENT_URL", "Specify the environment URL") do |environment_url|
59
+ options[:environment_url] = environment_url
60
+ end
61
+ opts.on("-f", "--environment_node_name ENVIRONMENT_NODENAME", "Specify the environment node name") do |node_name|
62
+ options[:environment_nodename] = node_name
63
+ end
64
+ opts.on("-n", "--environment_name ENVIRONMENT_NAME", "Specify the environment name") do |environment_name|
65
+ options[:environment_name] = environment_name
66
+ end
67
+ opts.on("-u SELENIUM_REMOTE_URL", "--selenium_remote_url SELENIUM_REMOTE_URL", "Specify the device's remote url and port") do |remote_url|
68
+ options[:remote_url] = remote_url
69
+ end
70
+ opts.on("-s SCREENCAP_PATH", "--screencap-path SCREENCAP_PATH", "Specify the path where screenshots will be saved") do |screencap_path|
71
+ options[:screencap_path] = screencap_path
72
+ end
73
+ opts.on("-d", "--debug", "Run debugger on first script failure") do
74
+ options[:debug_on_fail] = true
75
+ end
76
+ # add persistent logging for awetestlib. pmn 05jun2012
77
+ opts.on("-o", "--output_to_log", "Write to log file") do
78
+ options[:output_to_log] = true
79
+ end
80
+ opts.on("", "--log_path_subdir LOG_PATH_SUBDIR", "Specify log path relative to root_path.") do |log_path_subdir|
81
+ options[:log_path_subdir] = log_path_subdir
82
+ end
83
+ opts.on("", "--report_all_test_refs REPORT_ALL_TEST_REFS", "Include list of all error/test case reference ids actually validated.") do
84
+ options[:report_all_test_refs] = true
85
+ end
86
+
87
+ end.parse!
88
+
89
+ options[:environment] ||= {}
90
+ options[:environment]["name"] = options[:environment_name]
91
+ options[:environment]["url"] = options[:environment_url]
92
+ options[:environment]["nodename"] = options[:environment_nodename]
93
+ check_script_type(options)
94
+
95
+ IS_WIN_2008 = File.exists?("config/win2008.txt")
96
+ Awetestlib::Runner.new(options)
97
+
98
+
99
+ end
@@ -1,27 +1,27 @@
1
- def awetestlib_android_setup
2
- if ARGV[1].nil?
3
- @proj_dir = "sample_android"
4
- else
5
- @proj_dir = ARGV[1]
6
- end
7
-
8
- @cucumber_dir = File.join(FileUtils.pwd, @proj_dir)
9
- @source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_android')
10
-
11
- if File.exists?(@cucumber_dir)
12
- puts "Android project directory already exists."
13
- exit 1
14
- end
15
-
16
- msg("Question") do
17
- puts "I'm about to create an android project named #{@proj_dir} in this directory"
18
- puts "Please hit return to confirm that's what you want."
19
- puts "NOTE: You may need to run this command as an administrator."
20
- end
21
- exit 2 unless STDIN.gets.chomp == ''
22
- FileUtils.cp_r(@source_dir, @cucumber_dir)
23
- msg("Info") do
24
- puts "Configuring files and settings"
25
- end
26
-
1
+ def awetestlib_android_setup
2
+ if ARGV[1].nil?
3
+ @proj_dir = "sample_android"
4
+ else
5
+ @proj_dir = ARGV[1]
6
+ end
7
+
8
+ @cucumber_dir = File.join(FileUtils.pwd, @proj_dir)
9
+ @source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_android')
10
+
11
+ if File.exists?(@cucumber_dir)
12
+ puts "Android project directory already exists."
13
+ exit 1
14
+ end
15
+
16
+ msg("Question") do
17
+ puts "I'm about to create an android project named #{@proj_dir} in this directory"
18
+ puts "Please hit return to confirm that's what you want."
19
+ puts "NOTE: You may need to run this command as an administrator."
20
+ end
21
+ exit 2 unless STDIN.gets.chomp == ''
22
+ FileUtils.cp_r(@source_dir, @cucumber_dir)
23
+ msg("Info") do
24
+ puts "Configuring files and settings"
25
+ end
26
+
27
27
  end
@@ -1,29 +1,29 @@
1
- def awetestlib_cucumber_setup
2
- if ARGV[1].nil?
3
- @proj_dir = "sample_cucumber"
4
- else
5
- @proj_dir = ARGV[1]
6
- end
7
-
8
- @cucumber_dir = File.join(FileUtils.pwd, @proj_dir)
9
- @source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_cucumber')
10
-
11
- if File.exists?(@cucumber_dir)
12
- puts "Cucumber project directory already exists."
13
- exit 1
14
- end
15
-
16
- msg("Question") do
17
- puts "I'm about to create a cucumber project named #{@proj_dir} in this directory"
18
- puts "Please hit return to confirm that's what you want."
19
- puts "NOTE: You may need to run this command as an administrator."
20
- end
21
- exit 2 unless STDIN.gets.chomp == ''
22
- FileUtils.cp_r(@source_dir, @cucumber_dir)
23
- msg("Info") do
24
- puts "Configuring files and settings"
25
- puts "From the sample_cucumber/features folder, you may now run command below:"
26
- puts "cucumber yahoo_mail.feature"
27
- end
28
-
1
+ def awetestlib_cucumber_setup
2
+ if ARGV[1].nil?
3
+ @proj_dir = "sample_cucumber"
4
+ else
5
+ @proj_dir = ARGV[1]
6
+ end
7
+
8
+ @cucumber_dir = File.join(FileUtils.pwd, @proj_dir)
9
+ @source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_cucumber')
10
+
11
+ if File.exists?(@cucumber_dir)
12
+ puts "Cucumber project directory already exists."
13
+ exit 1
14
+ end
15
+
16
+ msg("Question") do
17
+ puts "I'm about to create a cucumber project named #{@proj_dir} in this directory"
18
+ puts "Please hit return to confirm that's what you want."
19
+ puts "NOTE: You may need to run this command as an administrator."
20
+ end
21
+ exit 2 unless STDIN.gets.chomp == ''
22
+ FileUtils.cp_r(@source_dir, @cucumber_dir)
23
+ msg("Info") do
24
+ puts "Configuring files and settings"
25
+ puts "From the sample_cucumber/features folder, you may now run command below:"
26
+ puts "cucumber yahoo_mail.feature"
27
+ end
28
+
29
29
  end
@@ -1,21 +1,21 @@
1
- require 'pry'
2
- def awetestlib_driver_setup
3
- current_dir = Dir.pwd
4
- drivers_dir = File.expand_path(File.join(File.dirname(__FILE__), "..", "drivers"))
5
- # binding.pry
6
- ie_driver = File.join(drivers_dir,"IEDriverServer.exe")
7
- chrome_driver = File.join(drivers_dir,"chromedriver.exe")
8
- msg("Question") do
9
- puts "I'm about to put the chromedriver and IEDriverServer in this directory"
10
- puts "If it already exists, we will overwrite it"
11
- puts "Please hit return to confirm that's what you want."
12
- puts "NOTE: You may need to run this command as an administrator."
13
- end
14
- exit 2 unless STDIN.gets.chomp == ''
15
- FileUtils.cp(ie_driver, current_dir)
16
- FileUtils.cp(chrome_driver,current_dir)
17
- msg("Info") do
18
- puts "Successfully copied chromedriver and IEDriverServer to #{current_dir}"
19
- end
20
-
21
- end
1
+ require 'pry'
2
+ def awetestlib_driver_setup
3
+ current_dir = Dir.pwd
4
+ drivers_dir = File.expand_path(File.join(File.dirname(__FILE__), "..", "drivers"))
5
+ # binding.pry
6
+ ie_driver = File.join(drivers_dir,"IEDriverServer.exe")
7
+ chrome_driver = File.join(drivers_dir,"chromedriver.exe")
8
+ msg("Question") do
9
+ puts "I'm about to put the chromedriver and IEDriverServer in this directory"
10
+ puts "If it already exists, we will overwrite it"
11
+ puts "Please hit return to confirm that's what you want."
12
+ puts "NOTE: You may need to run this command as an administrator."
13
+ end
14
+ exit 2 unless STDIN.gets.chomp == ''
15
+ FileUtils.cp(ie_driver, current_dir)
16
+ FileUtils.cp(chrome_driver,current_dir)
17
+ msg("Info") do
18
+ puts "Successfully copied chromedriver and IEDriverServer to #{current_dir}"
19
+ end
20
+
21
+ end
@@ -1,42 +1,42 @@
1
- def msg(title, &block)
2
- puts "\n" + "-"*10 + title + "-"*10
3
- block.call
4
- puts "-"*10 + "-------" + "-"*10 + "\n"
5
- end
6
-
7
-
8
- def print_usage
9
- puts <<EOF
10
- Usage Options:
11
-
12
- awetestlib regression_setup
13
- setup awetest regression and register autoitx3.dll
14
-
15
- awetestlib rubymine_setup <project_name>
16
- setup a rubymine project
17
-
18
- awetestlib netbeans_setup <project_name>
19
- setup a netbeans project
20
-
21
- awetestlib mobile_app_setup <project_name>
22
- setup a mobile app project
23
-
24
- awetestlib cucumber_setup <project_name>
25
- setup cucumber regression and provide skeleton folder structure
26
-
27
- awetestlib <script_file> [parameters]
28
- run an awetest regression script
29
-
30
- EOF
31
- end
32
-
33
- def check_script_type(options)
34
- script_options = ['Regression', 'Cucumber']
35
- if script_options.include? ARGV[0]
36
- options[:script_type] = ARGV[0]
37
- options[:script_file] = ARGV[1]
38
- else
39
- options[:script_type] = 'Regression'
40
- options[:script_file] = ARGV[0]
41
- end
1
+ def msg(title, &block)
2
+ puts "\n" + "-"*10 + title + "-"*10
3
+ block.call
4
+ puts "-"*10 + "-------" + "-"*10 + "\n"
5
+ end
6
+
7
+
8
+ def print_usage
9
+ puts <<EOF
10
+ Usage Options:
11
+
12
+ awetestlib regression_setup
13
+ setup awetest regression and register autoitx3.dll
14
+
15
+ awetestlib rubymine_setup <project_name>
16
+ setup a rubymine project
17
+
18
+ awetestlib netbeans_setup <project_name>
19
+ setup a netbeans project
20
+
21
+ awetestlib mobile_app_setup <project_name>
22
+ setup a mobile app project
23
+
24
+ awetestlib cucumber_setup <project_name>
25
+ setup cucumber regression and provide skeleton folder structure
26
+
27
+ awetestlib <script_file> [parameters]
28
+ run an awetest regression script
29
+
30
+ EOF
31
+ end
32
+
33
+ def check_script_type(options)
34
+ script_options = ['Regression', 'Cucumber']
35
+ if script_options.include? ARGV[0]
36
+ options[:script_type] = ARGV[0]
37
+ options[:script_file] = ARGV[1]
38
+ else
39
+ options[:script_type] = 'Regression'
40
+ options[:script_file] = ARGV[0]
41
+ end
42
42
  end
@@ -1,31 +1,31 @@
1
- def awetestlib_mobile_app_setup
2
- if ARGV[1].nil?
3
- @proj_dir = "sample_mobile_app"
4
- else
5
- @proj_dir = ARGV[1]
6
- end
7
-
8
- @cucumber_dir = File.join(FileUtils.pwd, @proj_dir)
9
- @source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_mobile_app')
10
-
11
- if File.exists?(@cucumber_dir)
12
- puts "Mobile app project directory already exists."
13
- exit 1
14
- end
15
-
16
- msg("Question") do
17
- puts "I'm about to create a mobile app project named #{ARGV[1]} in this directory" if ARGV[1]
18
- puts "I'm about to create a mobile app project named sample_mobile_app in this directory" if ARGV[1].nil?
19
- puts "Please hit return to confirm that's what you want."
20
- puts "NOTE: You may need to run this command as an administrator."
21
- end
22
- exit 2 unless STDIN.gets.chomp == ''
23
-
24
- FileUtils.cp_r(@source_dir, @cucumber_dir)
25
-
26
- msg("Info") do
27
- puts "Configuring files and settings..."
28
- puts "A skeleton project has been created with a features and step definitions folder"
29
- end
30
-
31
- end
1
+ def awetestlib_mobile_app_setup
2
+ if ARGV[1].nil?
3
+ @proj_dir = "sample_mobile_app"
4
+ else
5
+ @proj_dir = ARGV[1]
6
+ end
7
+
8
+ @cucumber_dir = File.join(FileUtils.pwd, @proj_dir)
9
+ @source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_mobile_app')
10
+
11
+ if File.exists?(@cucumber_dir)
12
+ puts "Mobile app project directory already exists."
13
+ exit 1
14
+ end
15
+
16
+ msg("Question") do
17
+ puts "I'm about to create a mobile app project named #{ARGV[1]} in this directory" if ARGV[1]
18
+ puts "I'm about to create a mobile app project named sample_mobile_app in this directory" if ARGV[1].nil?
19
+ puts "Please hit return to confirm that's what you want."
20
+ puts "NOTE: You may need to run this command as an administrator."
21
+ end
22
+ exit 2 unless STDIN.gets.chomp == ''
23
+
24
+ FileUtils.cp_r(@source_dir, @cucumber_dir)
25
+
26
+ msg("Info") do
27
+ puts "Configuring files and settings..."
28
+ puts "A skeleton project has been created with a features and step definitions folder"
29
+ end
30
+
31
+ end