testcentricity 3.0.4 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +48 -46
  4. data/lib/testcentricity/app_core/appium_connect_helper.rb +6 -8
  5. data/lib/testcentricity/app_core/screen_section.rb +0 -1
  6. data/lib/testcentricity/app_elements/app_element_helper.rb +14 -4
  7. data/lib/testcentricity/version.rb +1 -1
  8. metadata +13 -158
  9. data/.gitignore +0 -40
  10. data/.rspec +0 -4
  11. data/.rubocop.yml +0 -38
  12. data/.ruby-version +0 -1
  13. data/.simplecov +0 -9
  14. data/CODE_OF_CONDUCT.md +0 -13
  15. data/Gemfile +0 -6
  16. data/Rakefile +0 -63
  17. data/config/cucumber.yml +0 -146
  18. data/config/locales/en-US.yml +0 -56
  19. data/config/test_data/data.yml +0 -76
  20. data/features/deep_links.feature +0 -38
  21. data/features/login.feature +0 -30
  22. data/features/navigation.feature +0 -43
  23. data/features/step_definitions/generic_steps.rb +0 -67
  24. data/features/support/android/screens/about_screen.rb +0 -11
  25. data/features/support/android/screens/base_app_screen.rb +0 -31
  26. data/features/support/android/screens/biometrics_screen.rb +0 -17
  27. data/features/support/android/screens/checkout_address_screen.rb +0 -17
  28. data/features/support/android/screens/checkout_payment_screen.rb +0 -22
  29. data/features/support/android/screens/geo_location_screen.rb +0 -28
  30. data/features/support/android/screens/login_screen.rb +0 -18
  31. data/features/support/android/screens/product_item_screen.rb +0 -39
  32. data/features/support/android/screens/products_screen.rb +0 -27
  33. data/features/support/android/screens/qr_code_scanner_screen.rb +0 -15
  34. data/features/support/android/screens/saucebot_screen.rb +0 -16
  35. data/features/support/android/screens/webview_screen.rb +0 -13
  36. data/features/support/android/sections/list_items/product_list_item.rb +0 -13
  37. data/features/support/android/sections/nav_widgets/nav_menu.rb +0 -39
  38. data/features/support/data/product_data.rb +0 -27
  39. data/features/support/data/user_data.rb +0 -17
  40. data/features/support/env.rb +0 -62
  41. data/features/support/hooks.rb +0 -135
  42. data/features/support/ios/screens/about_screen.rb +0 -11
  43. data/features/support/ios/screens/base_app_screen.rb +0 -20
  44. data/features/support/ios/screens/biometrics_screen.rb +0 -17
  45. data/features/support/ios/screens/checkout_address_screen.rb +0 -17
  46. data/features/support/ios/screens/checkout_payment_screen.rb +0 -22
  47. data/features/support/ios/screens/geo_location_screen.rb +0 -32
  48. data/features/support/ios/screens/login_screen.rb +0 -18
  49. data/features/support/ios/screens/product_item_screen.rb +0 -39
  50. data/features/support/ios/screens/products_screen.rb +0 -27
  51. data/features/support/ios/screens/qr_code_scanner_screen.rb +0 -11
  52. data/features/support/ios/screens/saucebot_screen.rb +0 -16
  53. data/features/support/ios/screens/webview_screen.rb +0 -13
  54. data/features/support/ios/sections/list_items/product_list_item.rb +0 -13
  55. data/features/support/ios/sections/nav_widgets/nav_bar.rb +0 -31
  56. data/features/support/ios/sections/nav_widgets/nav_menu.rb +0 -41
  57. data/features/support/shared_components/screens/base_app_screen.rb +0 -35
  58. data/features/support/shared_components/screens/checkout_address_screen.rb +0 -17
  59. data/features/support/shared_components/screens/checkout_payment_screen.rb +0 -22
  60. data/features/support/shared_components/screens/login_screen.rb +0 -39
  61. data/features/support/shared_components/screens/saucebot_screen.rb +0 -17
  62. data/features/support/shared_components/screens/webview_screen.rb +0 -12
  63. data/features/support/shared_components/sections/nav_menu.rb +0 -58
  64. data/features/support/world_data.rb +0 -15
  65. data/features/support/world_pages.rb +0 -30
  66. data/reports/.keep +0 -1
  67. data/spec/fixtures/page_object.rb +0 -22
  68. data/spec/fixtures/page_section_object.rb +0 -21
  69. data/spec/fixtures/screen_object.rb +0 -16
  70. data/spec/fixtures/screen_section_object.rb +0 -16
  71. data/spec/spec_helper.rb +0 -33
  72. data/spec/testcentricity/elements/button_spec.rb +0 -18
  73. data/spec/testcentricity/elements/checkbox_spec.rb +0 -28
  74. data/spec/testcentricity/elements/image_spec.rb +0 -13
  75. data/spec/testcentricity/elements/label_spec.rb +0 -18
  76. data/spec/testcentricity/elements/list_spec.rb +0 -13
  77. data/spec/testcentricity/elements/ui_element_spec.rb +0 -72
  78. data/spec/testcentricity/mobile/appium_connect_spec.rb +0 -117
  79. data/spec/testcentricity/mobile/screen_object_spec.rb +0 -63
  80. data/spec/testcentricity/mobile/screen_section_object_spec.rb +0 -56
  81. data/spec/testcentricity/version_spec.rb +0 -7
  82. data/spec/testcentricity/web/browser_spec.rb +0 -41
  83. data/spec/testcentricity/web/local_webdriver_spec.rb +0 -86
  84. data/spec/testcentricity/web/mobile_webdriver_spec.rb +0 -123
  85. data/spec/testcentricity/web/page_object_spec.rb +0 -85
  86. data/spec/testcentricity/web/page_section_object_spec.rb +0 -72
  87. data/testcentricity.gemspec +0 -48
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4c7b4120e8589701d29a850600108df295c1c199fa8c19e9f6f92bd76b49a47
4
- data.tar.gz: 956e90ac6395ed32e69c2fd7558977398b8c42c075577d858090ce194da8c668
3
+ metadata.gz: 2758825ab228a75d0bae37cbdc399b496ad7328864ec502004da2baddaf12fa8
4
+ data.tar.gz: 986612a77b2c174bd8617744745d08a402cdda609df528851a9d5c78a4e40c6e
5
5
  SHA512:
6
- metadata.gz: b389a6ce9b701bb380ae02d34b7dc2880617aa315738a59082dfabf3c00fc2411d4f7ab99b3102f048918c9cc77e2e02b3b475fae3836986bfcc2237d7495112
7
- data.tar.gz: b8d6b8ce2cb4cf7f98d66b8fe7ea7a9e4a1db0a07d3410660d5e6c06d962dc0bb48ce761d8998b4ac1475165ae042f8116109f049b8241e6eda7f64eb7147430
6
+ metadata.gz: b1e22099243c98338cb90a1d9d67e42bb7a1e2c71cf2783f8d7afbde6470aedcd78f4e4a06a37ed341725b13d34fde5c6183ff6a0e99977a8781e799bbe89f30
7
+ data.tar.gz: aa5f2334030c4911c8ed8ab6749c0d30d4aba8334688b2eac9298e932ed79f67182e931b9693ae998c10f38d0050251ff1ba705dbd7373a090a21dfff2259e39
data/CHANGELOG.md CHANGED
@@ -2,6 +2,35 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [3.1.0] - 02-AUGUST-2022
6
+
7
+ ### Added
8
+ * The `DRIVER` Environment Variable is now used to specify the `appium`, `browserstack`, `saucelabs`, `testingbot`,
9
+ or `lambdatest` driver.
10
+
11
+ * ### Changed
12
+ * The `WEB_BROWSER` Environment Variable is no longer used to specify the `appium`, `browserstack`, `saucelabs`, `testingbot`,
13
+ or `lambdatest` driver.
14
+ * TestCentricity now supports and integrates with Selenium-Webdriver version 4.3.
15
+
16
+
17
+ ## [3.0.6] - 21-JUNE-2022
18
+
19
+ ### Fixed
20
+ * `AppButton.get_caption` correctly returns captions of React Native buttons on Android platform where button caption object
21
+ hierarchy is `//android.widget.Button/android.widget.ViewGroup/android.widget.TextView`.
22
+
23
+
24
+ ## [3.0.5] - 12-JUNE-2022
25
+
26
+ ### Fixed
27
+ * Fix `gemspec` to no longer include specs and cuke tests as part of deployment package for gem.
28
+
29
+ ### Updated
30
+ * Incorporated all changes from the [TestCentricity™ Web gem](https://rubygems.org/gems/testcentricity_web) version 4.2.6, which is
31
+ bundled with this gem.
32
+
33
+
5
34
  ## [3.0.4] - 02-JUNE-2022
6
35
 
7
36
  ### Added
data/README.md CHANGED
@@ -5,10 +5,10 @@
5
5
 
6
6
 
7
7
  The TestCentricity™ core framework for native mobile iOS and Android apps and desktop/mobile web testing implements a Screen
8
- and Page Object Model DSL for use with Cucumber (version 7.x or greater), Appium, Capybara, and Selenium-Webdriver (version 4.x). It also facilitates
9
- the configuration of the appropriate Appium capabilities and driver required to establish a connection with locally hosted or
10
- cloud hosted (using BrowserStack, Sauce Labs, or TestingBot services) iOS and Android real devices or simulators. For more
11
- information on desktop/mobile web testing with this gem, refer to docs for the [TestCentricity™ Web gem](https://www.rubydoc.info/gems/testcentricity_web)
8
+ and Page Object Model DSL for use with Cucumber (version 7.x or greater), Appium, Capybara, and Selenium-Webdriver (version
9
+ 4.3). It also facilitates the configuration of the appropriate Appium capabilities and driver required to establish a connection
10
+ with locally hosted or cloud hosted (using BrowserStack, Sauce Labs, or TestingBot services) iOS and Android real devices or
11
+ simulators. For more information on desktop/mobile web testing with this gem, refer to docs for the [TestCentricity™ Web gem](https://www.rubydoc.info/gems/testcentricity_web)
12
12
 
13
13
  The TestCentricity™ gem supports automated testing of native iOS and Android apps running on the following mobile test targets:
14
14
  * locally hosted iOS device simulators or physical iOS devices (using Appium and XCode on macOS)
@@ -858,7 +858,9 @@ tests, place the code shown below into your `hooks.rb` file.
858
858
  BeforeAll do
859
859
  # start Appium Server if command line option was specified and target browser is mobile simulator or device
860
860
  if ENV['APPIUM_SERVER'] == 'run' && Environ.driver == :appium
861
- end
861
+ $server = TestCentricity::AppiumServer.new
862
+ $server.start
863
+ end
862
864
  end
863
865
 
864
866
  AfterAll do
@@ -885,24 +887,24 @@ The Appium server must be running prior to invoking Cucumber to run your feature
885
887
 
886
888
  Once your test environment is properly configured, the following **Environment Variables** must be set as described in the table below.
887
889
 
888
- | **Environment Variable** | **Description** |
889
- |----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
890
- | `WEB_BROWSER` | Must be set to `appium` |
891
- | `APP_PLATFORM_NAME` | Must be set to `iOS` |
892
- | `AUTOMATION_ENGINE` | Must be set to `XCUITest` |
893
- | `APP_VERSION` | Must be set to `15.4`, `14.5`, or which ever iOS version you wish to run within the XCode Simulator |
894
- | `APP_DEVICE` | Set to iOS device name supported by the iOS Simulator (`iPhone 13 Pro Max`, `iPad Pro (12.9-inch) (5th generation)`, etc.) or name of physically connected iOS device |
895
- | `DEVICE_TYPE` | Must be set to `phone` or `tablet` |
896
- | `APP_UDID` | UDID of physically connected iOS device (not used for simulators) |
897
- | `TEAM_ID` | unique 10-character Apple developer team identifier string (not used for simulators) |
898
- | `TEAM_NAME` | String representing a signing certificate (not used for simulators) |
899
- | `APP_NO_RESET` | [Optional] Don't reset app state after each test. Set to `true` or `false` |
900
- | `APP_FULL_RESET` | [Optional] Perform a complete reset. Set to `true` or `false` |
901
- | `WDA_LOCAL_PORT` | [Optional] Used to forward traffic from Mac host to real iOS devices over USB. Default value is same as port number used by WDA on device. |
902
- | `LOCALE` | [Optional] Locale to set for the simulator. e.g. `fr_CA` |
903
- | `LANGUAGE` | [Optional] Language to set for the simulator. e.g. `fr` |
904
- | `ORIENTATION` | [Optional] Set to `portrait` or `landscape` (only for iOS simulators) |
905
- | `NEW_COMMAND_TIMEOUT` | [Optional] Time (in Seconds) that Appium will wait for a new command from the client |
890
+ | **Environment Variable** | **Description** |
891
+ |--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
892
+ | `DRIVER` | Must be set to `appium` |
893
+ | `APP_PLATFORM_NAME` | Must be set to `iOS` |
894
+ | `AUTOMATION_ENGINE` | Must be set to `XCUITest` |
895
+ | `APP_VERSION` | Must be set to `15.4`, `14.5`, or which ever iOS version you wish to run within the XCode Simulator |
896
+ | `APP_DEVICE` | Set to iOS device name supported by the iOS Simulator (`iPhone 13 Pro Max`, `iPad Pro (12.9-inch) (5th generation)`, etc.) or name of physically connected iOS device |
897
+ | `DEVICE_TYPE` | Must be set to `phone` or `tablet` |
898
+ | `APP_UDID` | UDID of physically connected iOS device (not used for simulators) |
899
+ | `TEAM_ID` | unique 10-character Apple developer team identifier string (not used for simulators) |
900
+ | `TEAM_NAME` | String representing a signing certificate (not used for simulators) |
901
+ | `APP_NO_RESET` | [Optional] Don't reset app state after each test. Set to `true` or `false` |
902
+ | `APP_FULL_RESET` | [Optional] Perform a complete reset. Set to `true` or `false` |
903
+ | `WDA_LOCAL_PORT` | [Optional] Used to forward traffic from Mac host to real iOS devices over USB. Default value is same as port number used by WDA on device. |
904
+ | `LOCALE` | [Optional] Locale to set for the simulator. e.g. `fr_CA` |
905
+ | `LANGUAGE` | [Optional] Language to set for the simulator. e.g. `fr` |
906
+ | `ORIENTATION` | [Optional] Set to `portrait` or `landscape` (only for iOS simulators) |
907
+ | `NEW_COMMAND_TIMEOUT` | [Optional] Time (in Seconds) that Appium will wait for a new command from the client |
906
908
 
907
909
 
908
910
  Refer to **section 9.5 (Using Configuration Specific Profiles in cucumber.yml)** below.
@@ -917,21 +919,21 @@ to run your features/scenarios.
917
919
 
918
920
  Once your test environment is properly configured, the following **Environment Variables** must be set as described in the table below.
919
921
 
920
- | **Environment Variable** | **Description** |
921
- |---------------------------|--------------------------------------------------------------------------------------------------------------------------------|
922
- | `WEB_BROWSER` | Must be set to `appium` |
923
- | `APP_PLATFORM_NAME` | Must be set to `Android` |
924
- | `AUTOMATION_ENGINE` | Must be set to `UiAutomator2` |
925
- | `APP_VERSION` | Must be set to `12.0`, or which ever Android OS version you wish to run with the Android Virtual Device |
926
- | `APP_DEVICE` | Set to Android Virtual Device ID (`Pixel_2_XL_API_26`, `Nexus_6_API_23`, etc.) found in Advanced Settings of AVD Configuration |
927
- | `DEVICE_TYPE` | Must be set to `phone` or `tablet` |
928
- | `APP_UDID` | UDID of physically connected Android device (not used for simulators) |
929
- | `ORIENTATION` | [Optional] Set to `portrait` or `landscape` |
930
- | `APP_NO_RESET` | [Optional] Don't reset app state after each test. Set to `true` or `false` |
931
- | `APP_FULL_RESET` | [Optional] Perform a complete reset. Set to `true` or `false` |
932
- | `LOCALE` | [Optional] Locale to set for the simulator. e.g. `fr_CA` |
933
- | `LANGUAGE` | [Optional] Language to set for the simulator. e.g. `fr` |
934
- | `NEW_COMMAND_TIMEOUT` | [Optional] Time (in Seconds) that Appium will wait for a new command from the client |
922
+ | **Environment Variable** | **Description** |
923
+ |--------------------------|--------------------------------------------------------------------------------------------------------------------------------|
924
+ | `DRIVER` | Must be set to `appium` |
925
+ | `APP_PLATFORM_NAME` | Must be set to `Android` |
926
+ | `AUTOMATION_ENGINE` | Must be set to `UiAutomator2` |
927
+ | `APP_VERSION` | Must be set to `12.0`, or which ever Android OS version you wish to run with the Android Virtual Device |
928
+ | `APP_DEVICE` | Set to Android Virtual Device ID (`Pixel_2_XL_API_26`, `Nexus_6_API_23`, etc.) found in Advanced Settings of AVD Configuration |
929
+ | `DEVICE_TYPE` | Must be set to `phone` or `tablet` |
930
+ | `APP_UDID` | UDID of physically connected Android device (not used for simulators) |
931
+ | `ORIENTATION` | [Optional] Set to `portrait` or `landscape` |
932
+ | `APP_NO_RESET` | [Optional] Don't reset app state after each test. Set to `true` or `false` |
933
+ | `APP_FULL_RESET` | [Optional] Perform a complete reset. Set to `true` or `false` |
934
+ | `LOCALE` | [Optional] Locale to set for the simulator. e.g. `fr_CA` |
935
+ | `LANGUAGE` | [Optional] Language to set for the simulator. e.g. `fr` |
936
+ | `NEW_COMMAND_TIMEOUT` | [Optional] Time (in Seconds) that Appium will wait for a new command from the client |
935
937
 
936
938
 
937
939
  Refer to **section 9.5 (Using Configuration Specific Profiles in cucumber.yml)** below.
@@ -951,7 +953,7 @@ for information regarding the specific capabilities.
951
953
 
952
954
  | **Environment Variable** | **Description** |
953
955
  |--------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
954
- | `WEB_BROWSER` | Must be set to `browserstack` |
956
+ | `DRIVER` | Must be set to `browserstack` |
955
957
  | `BS_USERNAME` | Must be set to your BrowserStack account user name |
956
958
  | `BS_AUTHKEY` | Must be set to your BrowserStack account access key |
957
959
  | `BS_OS` | Must be set to `ios` or `android` |
@@ -975,7 +977,7 @@ to obtain information regarding the specific capabilities.
975
977
 
976
978
  | **Environment Variable** | **Description** |
977
979
  |--------------------------|-----------------------------------------------------------------------------------------------------------------|
978
- | `WEB_BROWSER` | Must be set to `saucelabs` |
980
+ | `DRIVER` | Must be set to `saucelabs` |
979
981
  | `SL_USERNAME` | Must be set to your Sauce Labs account user name or email address |
980
982
  | `SL_AUTHKEY` | Must be set to your Sauce Labs account access key |
981
983
  | `DATA_CENTER` | Must be set to your Sauce Labs account Data Center assignment (`us-west-1`, `eu-central-1`, `apac-southeast-1`) |
@@ -996,7 +998,7 @@ for information regarding the specific capabilities.
996
998
 
997
999
  | **Environment Variable** | **Description** |
998
1000
  |--------------------------|---------------------------------------------------|
999
- | `WEB_BROWSER` | Must be set to `testingbot` |
1001
+ | `DRIVER` | Must be set to `testingbot` |
1000
1002
  | `TB_USERNAME` | Must be set to your TestingBot account user name |
1001
1003
  | `TB_AUTHKEY` | Must be set to your TestingBot account access key |
1002
1004
  | `TB_OS` | Must be set to `ios` or `android` |
@@ -1046,7 +1048,7 @@ code for the cloud service(s) that you intend to connect with.
1046
1048
  # NOTE: Requires installation of XCode, iOS version specific target simulators, and Appium
1047
1049
  #==============
1048
1050
 
1049
- appium_ios: WEB_BROWSER=appium --profile ios AUTOMATION_ENGINE=XCUITest APP_PLATFORM_NAME="iOS" NEW_COMMAND_TIMEOUT="30" <%= mobile %>
1051
+ appium_ios: DRIVER=appium --profile ios AUTOMATION_ENGINE=XCUITest APP_PLATFORM_NAME="iOS" NEW_COMMAND_TIMEOUT="30" <%= mobile %>
1050
1052
  app_ios_14: --profile appium_ios APP_VERSION="14.5"
1051
1053
  app_ios_15: --profile appium_ios APP_VERSION="15.4"
1052
1054
 
@@ -1061,7 +1063,7 @@ code for the cloud service(s) that you intend to connect with.
1061
1063
  # NOTE: Requires installation of Android Studio, Android version specific virtual device simulators, and Appium
1062
1064
  #==============
1063
1065
 
1064
- appium_android: WEB_BROWSER=appium --profile android AUTOMATION_ENGINE=UiAutomator2 APP_PLATFORM_NAME="Android" <%= mobile %>
1066
+ appium_android: DRIVER=appium --profile android AUTOMATION_ENGINE=UiAutomator2 APP_PLATFORM_NAME="Android" <%= mobile %>
1065
1067
  app_android_12: --profile appium_android APP_VERSION="12.0"
1066
1068
  pixel_5_api31_sim: --profile app_android_12 DEVICE_TYPE=phone APP_DEVICE="Pixel_5_API_31"
1067
1069
 
@@ -1072,7 +1074,7 @@ code for the cloud service(s) that you intend to connect with.
1072
1074
  # to your version control system
1073
1075
  #==============
1074
1076
 
1075
- browserstack: WEB_BROWSER=browserstack BS_USERNAME="<INSERT USER NAME HERE>" BS_AUTHKEY="<INSERT PASSWORD HERE>" TEST_CONTEXT="TestCentricity"
1077
+ browserstack: DRIVER=browserstack BS_USERNAME="<INSERT USER NAME HERE>" BS_AUTHKEY="<INSERT PASSWORD HERE>" TEST_CONTEXT="TestCentricity"
1076
1078
 
1077
1079
  # BrowserStack iOS real device native app profiles
1078
1080
  bs_ios: --profile browserstack --profile ios BS_OS=ios <%= mobile %>
@@ -1091,7 +1093,7 @@ code for the cloud service(s) that you intend to connect with.
1091
1093
  # to your version control system
1092
1094
  #==============
1093
1095
 
1094
- saucelabs: WEB_BROWSER=saucelabs SL_USERNAME="<INSERT USER NAME HERE>" SL_AUTHKEY="<INSERT PASSWORD HERE>" DATA_CENTER="us-west-1" AUTOMATE_PROJECT="TestCentricity - SauceLabs"
1096
+ saucelabs: DRIVER=saucelabs SL_USERNAME="<INSERT USER NAME HERE>" SL_AUTHKEY="<INSERT PASSWORD HERE>" DATA_CENTER="us-west-1" AUTOMATE_PROJECT="TestCentricity - SauceLabs"
1095
1097
 
1096
1098
  # SauceLabs iOS real device native app profiles
1097
1099
  sl_ios: --profile saucelabs --profile ios SL_OS=ios <%= mobile %>
@@ -1109,7 +1111,7 @@ code for the cloud service(s) that you intend to connect with.
1109
1111
  # to your version control system
1110
1112
  #==============
1111
1113
 
1112
- testingbot: WEB_BROWSER=testingbot TB_USERNAME="<INSERT USER NAME HERE>" TB_AUTHKEY="<INSERT PASSWORD HERE>" AUTOMATE_PROJECT="TestCentricity - TestingBot"
1114
+ testingbot: DRIVER=testingbot TB_USERNAME="<INSERT USER NAME HERE>" TB_AUTHKEY="<INSERT PASSWORD HERE>" AUTOMATE_PROJECT="TestCentricity - TestingBot"
1113
1115
 
1114
1116
  # TestingBot iOS real device native app profiles
1115
1117
  tb_ios: --profile testingbot --profile ios TB_OS=iOS <%= mobile %>
@@ -18,14 +18,12 @@ module TestCentricity
18
18
  @capabilities = options[:desired_capabilities] if options.key?(:desired_capabilities)
19
19
  end
20
20
  Environ.platform = :mobile
21
- Environ.driver = :appium
22
21
  Environ.device_type = ENV['DEVICE_TYPE'] if ENV['DEVICE_TYPE']
23
22
 
24
23
  Environ.device_orientation = ENV['ORIENTATION'] if ENV['ORIENTATION']
25
24
  Environ.device_os_version = ENV['APP_VERSION']
26
- browser = ENV['WEB_BROWSER']
27
- Environ.browser = browser
28
- case browser.downcase.to_sym
25
+ Environ.driver = ENV['DRIVER'].downcase.to_sym
26
+ case Environ.driver
29
27
  when :appium
30
28
  Environ.device_name = ENV['APP_DEVICE']
31
29
  Environ.device_os = ENV['APP_PLATFORM_NAME']
@@ -47,14 +45,13 @@ module TestCentricity
47
45
  Environ.device_name = ENV['LT_DEVICE']
48
46
  Environ.device_os = ENV['LT_OS']
49
47
  else
50
- raise "#{browser} is not a valid selector"
48
+ raise "#{Environ.driver} is not a valid selector"
51
49
  end
52
50
  @running = false
53
51
  end
54
52
 
55
53
  def self.start_driver
56
- browser = Environ.browser
57
- capabilities = case browser.downcase.to_sym
54
+ capabilities = case Environ.driver
58
55
  when :appium
59
56
  appium_local_capabilities
60
57
  when :browserstack
@@ -66,7 +63,7 @@ module TestCentricity
66
63
  when :lambdatest
67
64
  lambdatest_capabilities
68
65
  else
69
- raise "#{browser} is not a valid selector"
66
+ raise "#{Environ.driver} is not a valid selector"
70
67
  end
71
68
  puts "Appium desired_capabilities = #{capabilities}" if ENV['DEBUG']
72
69
 
@@ -271,6 +268,7 @@ module TestCentricity
271
268
  caps[:newCommandTimeout] = ENV['NEW_COMMAND_TIMEOUT'] if ENV['NEW_COMMAND_TIMEOUT']
272
269
  caps[:noReset] = ENV['APP_NO_RESET'] if ENV['APP_NO_RESET']
273
270
  caps[:fullReset] = ENV['APP_FULL_RESET'] if ENV['APP_FULL_RESET']
271
+ caps[:autoLaunch] = ENV['AUTO_LAUNCH'] if ENV['AUTO_LAUNCH']
274
272
  caps[:webkitDebugProxyPort] = ENV['WEBKIT_DEBUG_PROXY_PORT'] if ENV['WEBKIT_DEBUG_PROXY_PORT']
275
273
  caps[:webDriverAgentUrl] = ENV['WEBDRIVER_AGENT_URL'] if ENV['WEBDRIVER_AGENT_URL']
276
274
  caps[:wdaLocalPort] = ENV['WDA_LOCAL_PORT'] if ENV['WDA_LOCAL_PORT']
@@ -189,7 +189,6 @@ module TestCentricity
189
189
  end
190
190
  end
191
191
 
192
-
193
192
  def click
194
193
  section = find_section
195
194
  section_not_found_exception(section)
@@ -109,9 +109,19 @@ module TestCentricity
109
109
  end
110
110
  else
111
111
  caption = obj.text
112
- if caption.blank? && obj.attribute(:class) == 'android.view.ViewGroup'
113
- caption_obj = obj.find_element(:xpath, '//android.widget.TextView')
114
- caption = caption_obj.text
112
+ if caption.blank?
113
+ case obj.attribute(:class)
114
+ when 'android.view.ViewGroup'
115
+ caption_obj = obj.find_element(:xpath, '//android.widget.TextView')
116
+ caption = caption_obj.text
117
+ when 'android.widget.Button'
118
+ caption_obj = obj.find_element(:xpath, '//android.widget.TextView')
119
+ caption = caption_obj.text
120
+ if caption.blank?
121
+ caption_obj = obj.find_element(:xpath, '//android.widget.ViewGroup/android.widget.TextView')
122
+ caption = caption_obj.text
123
+ end
124
+ end
115
125
  end
116
126
  caption
117
127
  end
@@ -350,7 +360,7 @@ module TestCentricity
350
360
  obj = element
351
361
  object_not_found_exception(obj)
352
362
  if Environ.is_ios?
353
- $driver.execute_script('mobile: scroll', direction: direction.to_s, element: obj)
363
+ $driver.execute_script('mobile: scroll', { direction: direction })
354
364
  else
355
365
  case direction
356
366
  when :down
@@ -1,3 +1,3 @@
1
1
  module TestCentricity
2
- VERSION = '3.0.4'
2
+ VERSION = '3.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-02 00:00:00.000000000 Z
11
+ date: 2022-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: cucumber
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 8.0.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 8.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cuke_modeler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '3.10'
103
+ version: 3.11.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: '3.10'
110
+ version: 3.11.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: 4.2.4
187
+ version: 4.3.0
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - ">="
193
193
  - !ruby/object:Gem::Version
194
- version: 4.2.4
194
+ version: 4.3.0
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: test-unit
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -219,67 +219,10 @@ executables: []
219
219
  extensions: []
220
220
  extra_rdoc_files: []
221
221
  files:
222
- - ".gitignore"
223
- - ".rspec"
224
- - ".rubocop.yml"
225
- - ".ruby-version"
226
- - ".simplecov"
227
222
  - ".yardopts"
228
223
  - CHANGELOG.md
229
- - CODE_OF_CONDUCT.md
230
- - Gemfile
231
224
  - LICENSE.md
232
225
  - README.md
233
- - Rakefile
234
- - config/cucumber.yml
235
- - config/locales/en-US.yml
236
- - config/test_data/data.yml
237
- - features/deep_links.feature
238
- - features/login.feature
239
- - features/navigation.feature
240
- - features/step_definitions/generic_steps.rb
241
- - features/support/android/screens/about_screen.rb
242
- - features/support/android/screens/base_app_screen.rb
243
- - features/support/android/screens/biometrics_screen.rb
244
- - features/support/android/screens/checkout_address_screen.rb
245
- - features/support/android/screens/checkout_payment_screen.rb
246
- - features/support/android/screens/geo_location_screen.rb
247
- - features/support/android/screens/login_screen.rb
248
- - features/support/android/screens/product_item_screen.rb
249
- - features/support/android/screens/products_screen.rb
250
- - features/support/android/screens/qr_code_scanner_screen.rb
251
- - features/support/android/screens/saucebot_screen.rb
252
- - features/support/android/screens/webview_screen.rb
253
- - features/support/android/sections/list_items/product_list_item.rb
254
- - features/support/android/sections/nav_widgets/nav_menu.rb
255
- - features/support/data/product_data.rb
256
- - features/support/data/user_data.rb
257
- - features/support/env.rb
258
- - features/support/hooks.rb
259
- - features/support/ios/screens/about_screen.rb
260
- - features/support/ios/screens/base_app_screen.rb
261
- - features/support/ios/screens/biometrics_screen.rb
262
- - features/support/ios/screens/checkout_address_screen.rb
263
- - features/support/ios/screens/checkout_payment_screen.rb
264
- - features/support/ios/screens/geo_location_screen.rb
265
- - features/support/ios/screens/login_screen.rb
266
- - features/support/ios/screens/product_item_screen.rb
267
- - features/support/ios/screens/products_screen.rb
268
- - features/support/ios/screens/qr_code_scanner_screen.rb
269
- - features/support/ios/screens/saucebot_screen.rb
270
- - features/support/ios/screens/webview_screen.rb
271
- - features/support/ios/sections/list_items/product_list_item.rb
272
- - features/support/ios/sections/nav_widgets/nav_bar.rb
273
- - features/support/ios/sections/nav_widgets/nav_menu.rb
274
- - features/support/shared_components/screens/base_app_screen.rb
275
- - features/support/shared_components/screens/checkout_address_screen.rb
276
- - features/support/shared_components/screens/checkout_payment_screen.rb
277
- - features/support/shared_components/screens/login_screen.rb
278
- - features/support/shared_components/screens/saucebot_screen.rb
279
- - features/support/shared_components/screens/webview_screen.rb
280
- - features/support/shared_components/sections/nav_menu.rb
281
- - features/support/world_data.rb
282
- - features/support/world_pages.rb
283
226
  - lib/testcentricity.rb
284
227
  - lib/testcentricity/app_core/appium_connect_helper.rb
285
228
  - lib/testcentricity/app_core/screen_object.rb
@@ -297,28 +240,6 @@ files:
297
240
  - lib/testcentricity/app_elements/textfield.rb
298
241
  - lib/testcentricity/data_objects/environment.rb
299
242
  - lib/testcentricity/version.rb
300
- - reports/.keep
301
- - spec/fixtures/page_object.rb
302
- - spec/fixtures/page_section_object.rb
303
- - spec/fixtures/screen_object.rb
304
- - spec/fixtures/screen_section_object.rb
305
- - spec/spec_helper.rb
306
- - spec/testcentricity/elements/button_spec.rb
307
- - spec/testcentricity/elements/checkbox_spec.rb
308
- - spec/testcentricity/elements/image_spec.rb
309
- - spec/testcentricity/elements/label_spec.rb
310
- - spec/testcentricity/elements/list_spec.rb
311
- - spec/testcentricity/elements/ui_element_spec.rb
312
- - spec/testcentricity/mobile/appium_connect_spec.rb
313
- - spec/testcentricity/mobile/screen_object_spec.rb
314
- - spec/testcentricity/mobile/screen_section_object_spec.rb
315
- - spec/testcentricity/version_spec.rb
316
- - spec/testcentricity/web/browser_spec.rb
317
- - spec/testcentricity/web/local_webdriver_spec.rb
318
- - spec/testcentricity/web/mobile_webdriver_spec.rb
319
- - spec/testcentricity/web/page_object_spec.rb
320
- - spec/testcentricity/web/page_section_object_spec.rb
321
- - testcentricity.gemspec
322
243
  homepage: https://github.com/TestCentricity/testcentricity
323
244
  licenses:
324
245
  - BSD-3-Clause
@@ -346,70 +267,4 @@ signing_key:
346
267
  specification_version: 4
347
268
  summary: A Page Object Model Framework for native mobile app and desktop/mobile web
348
269
  portal testing
349
- test_files:
350
- - features/deep_links.feature
351
- - features/login.feature
352
- - features/navigation.feature
353
- - features/step_definitions/generic_steps.rb
354
- - features/support/android/screens/about_screen.rb
355
- - features/support/android/screens/base_app_screen.rb
356
- - features/support/android/screens/biometrics_screen.rb
357
- - features/support/android/screens/checkout_address_screen.rb
358
- - features/support/android/screens/checkout_payment_screen.rb
359
- - features/support/android/screens/geo_location_screen.rb
360
- - features/support/android/screens/login_screen.rb
361
- - features/support/android/screens/product_item_screen.rb
362
- - features/support/android/screens/products_screen.rb
363
- - features/support/android/screens/qr_code_scanner_screen.rb
364
- - features/support/android/screens/saucebot_screen.rb
365
- - features/support/android/screens/webview_screen.rb
366
- - features/support/android/sections/list_items/product_list_item.rb
367
- - features/support/android/sections/nav_widgets/nav_menu.rb
368
- - features/support/data/product_data.rb
369
- - features/support/data/user_data.rb
370
- - features/support/env.rb
371
- - features/support/hooks.rb
372
- - features/support/ios/screens/about_screen.rb
373
- - features/support/ios/screens/base_app_screen.rb
374
- - features/support/ios/screens/biometrics_screen.rb
375
- - features/support/ios/screens/checkout_address_screen.rb
376
- - features/support/ios/screens/checkout_payment_screen.rb
377
- - features/support/ios/screens/geo_location_screen.rb
378
- - features/support/ios/screens/login_screen.rb
379
- - features/support/ios/screens/product_item_screen.rb
380
- - features/support/ios/screens/products_screen.rb
381
- - features/support/ios/screens/qr_code_scanner_screen.rb
382
- - features/support/ios/screens/saucebot_screen.rb
383
- - features/support/ios/screens/webview_screen.rb
384
- - features/support/ios/sections/list_items/product_list_item.rb
385
- - features/support/ios/sections/nav_widgets/nav_bar.rb
386
- - features/support/ios/sections/nav_widgets/nav_menu.rb
387
- - features/support/shared_components/screens/base_app_screen.rb
388
- - features/support/shared_components/screens/checkout_address_screen.rb
389
- - features/support/shared_components/screens/checkout_payment_screen.rb
390
- - features/support/shared_components/screens/login_screen.rb
391
- - features/support/shared_components/screens/saucebot_screen.rb
392
- - features/support/shared_components/screens/webview_screen.rb
393
- - features/support/shared_components/sections/nav_menu.rb
394
- - features/support/world_data.rb
395
- - features/support/world_pages.rb
396
- - spec/fixtures/page_object.rb
397
- - spec/fixtures/page_section_object.rb
398
- - spec/fixtures/screen_object.rb
399
- - spec/fixtures/screen_section_object.rb
400
- - spec/spec_helper.rb
401
- - spec/testcentricity/elements/button_spec.rb
402
- - spec/testcentricity/elements/checkbox_spec.rb
403
- - spec/testcentricity/elements/image_spec.rb
404
- - spec/testcentricity/elements/label_spec.rb
405
- - spec/testcentricity/elements/list_spec.rb
406
- - spec/testcentricity/elements/ui_element_spec.rb
407
- - spec/testcentricity/mobile/appium_connect_spec.rb
408
- - spec/testcentricity/mobile/screen_object_spec.rb
409
- - spec/testcentricity/mobile/screen_section_object_spec.rb
410
- - spec/testcentricity/version_spec.rb
411
- - spec/testcentricity/web/browser_spec.rb
412
- - spec/testcentricity/web/local_webdriver_spec.rb
413
- - spec/testcentricity/web/mobile_webdriver_spec.rb
414
- - spec/testcentricity/web/page_object_spec.rb
415
- - spec/testcentricity/web/page_section_object_spec.rb
270
+ test_files: []
data/.gitignore DELETED
@@ -1,40 +0,0 @@
1
- # OSX folder stuff
2
- .DS_Store
3
- Thumbs.db
4
-
5
- #IDE project files
6
- .idea/
7
- .settings
8
- .project
9
-
10
- /.bundle/
11
- /.yardoc
12
- /_yardoc/
13
- /coverage/
14
- /doc/
15
- /pkg/
16
- /spec/reports/
17
- /tmp/
18
- Gemfile*.lock
19
- *gem
20
-
21
- # rspec failure tracking
22
- .rspec_status
23
-
24
- # Ignore test-reports
25
- reports/*.html
26
- reports/*.xml
27
- reports/*.json
28
- reports/screenshots/
29
- test-reports
30
- capybara-*.html
31
- debug.log
32
-
33
- BrowserStackLocal
34
- cbttunnel.jar
35
-
36
- /.yardoc/
37
- /local.log
38
- .run/*.xml
39
-
40
- echo coverage >> .gitignore
data/.rspec DELETED
@@ -1,4 +0,0 @@
1
- # General configuration options
2
- --color
3
- --require spec_helper
4
- --format documentation