testcentricity_web 2.3.9 → 2.3.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10f5ee4ad3563f66f3c4c2895a7c524bbff3fb0e
4
- data.tar.gz: 614dc46522cbe3adecf8b138e9d35a6958a474ac
3
+ metadata.gz: 2bb5bdb567d97f64c99f71975855ac2cf3391685
4
+ data.tar.gz: b3ecf410f1c74caa3c12c44d3541f49323e2321d
5
5
  SHA512:
6
- metadata.gz: 410a61b8b112e2d188256b0dca4cdad552ae429c9a315b728a94e19ecf8476dcb6ebdbf150329c83495034665c4bbdd6e2f341ce7502d9a6207fa6c7d1bf7032
7
- data.tar.gz: a39bc62386a55f49b6fb3d4e99b58c5eea93dd3a5d098d11de15a9c38ed683cb48ac518cf8c5a6e43517a51b44c536e0c127b4ccdbde6f5de346ac33b0cbdf96
6
+ metadata.gz: 0f70d6e2bcd4a1426618cacc02e8b2abecbd01a3a24d08d72de75bc8aa3131fa976a3fdef5bd276f092edbea9e2e9fe9ad094dc75f923251eb0a2d53beef6949
7
+ data.tar.gz: 12359211960e829b28b3ba6bb82f82d0081b6608061da1bfec909089bf422a62b9b3242640aa0cd856c58636e0803579104bd068e92d15e1bb6e7ec3a93e558a
data/README.md CHANGED
@@ -11,6 +11,7 @@ The TestCentricity™ Web gem supports running automated tests against the follo
11
11
  * locally hosted emulated iOS Mobile Safari, Android, Windows Phone, or Blackberry mobile browsers (running within a local instance of Chrome)
12
12
  * a "headless" browser (using Poltergeist and PhantomJS)
13
13
  * mobile Safari browsers on iOS device simulators (using Appium and XCode on OS X)
14
+ * mobile Chrome or Android browsers on Android Studio virtual device emulators (using Appium and Android Studio on OS X)
14
15
  * cloud hosted desktop (Firefox, Chrome, Safari, IE, or Edge) or mobile (iOS Mobile Safari or Android) web browsers using the [Browserstack](https://www.browserstack.com/list-of-browsers-and-platforms?product=automate),
15
16
  [Sauce Labs](https://saucelabs.com/open-source#automated-testing-platform), [CrossBrowserTesting](https://crossbrowsertesting.com/selenium-testing), or
16
17
  [TestingBot](https://testingbot.com/features) services.
@@ -27,6 +28,12 @@ hosted instances of Chrome, Firefox, Safari, and IE web browsers.
27
28
 
28
29
 
29
30
  ## What's New
31
+ ###Version 2.3.10
32
+
33
+ * Added support for running tests in mobile Chrome or Android browsers on Android Studio virtual device emulators.
34
+ * Added `displayed?`, `get_all_items_count`, and `get_all_list_items` methods to `PageSection` class.
35
+ * Added `get_all_items_count`, and `get_all_list_items` methods to `List` class.
36
+
30
37
  ###Version 2.3.9
31
38
 
32
39
  * Updated `PageObject.populate_data_fields` and `PageSection.populate_data_fields` methods to accept optional `wait_time` parameter.
@@ -904,10 +911,10 @@ to `chrome`.
904
911
  ### Mobile Safari browser on iOS Simulators
905
912
 
906
913
  You can run your mobile web tests against the mobile Safari browser on simulated iOS devices using Appium and XCode on OS X. You must install XCode, the
907
- iOS version-specific device simulators for XCode, and Appium. You must ensure that the `appium_capybara` gem is installed and required as described in
914
+ iOS version-specific device simulators for XCode, and Appium. You must also ensure that the `appium_capybara` gem is installed and required as described in
908
915
  **section 2.4 (Setup - Using Appium)** above.
909
916
 
910
- Appium must be running prior to invoking Cucumber to run your features/scenarios.
917
+ The Appium server must be running prior to invoking Cucumber to run your features/scenarios.
911
918
 
912
919
  Once your test environment is properly configured, the following **Environment Variables** must be set as described in the table below.
913
920
 
@@ -916,8 +923,9 @@ Once your test environment is properly configured, the following **Environment V
916
923
  `WEB_BROWSER` | Must be set to `appium`
917
924
  `APP_PLATFORM_NAME` | Must be set to `iOS`
918
925
  `APP_BROWSER` | Must be set to `Safari`
919
- `APP_VERSION` | Must be set to `10.0`, `9.3`, `9.2`, or which ever iOS version you wish to run within the XCode Simulator
920
- `APP_DEVICE` | Set to iOS device name supported by the iOS Simulator (`iPhone 6s Plus`, `iPad Pro`, `iPad Air 2`, etc.)
926
+ `APP_VERSION` | Must be set to `11.2`, `10.3`, `9.3`, or which ever iOS version you wish to run within the XCode Simulator
927
+ `APP_DEVICE` | Set to iOS device name supported by the iOS Simulator (`iPhone 6s Plus`, `iPad Pro (10.5-inch)`, `iPad Air 2`, etc.)
928
+ `DEVICE_TYPE` | Must be set to `phone` or `tablet`
921
929
  `ORIENTATION` | [Optional] Set to `portrait` or `landscape`
922
930
  `APP_ALLOW_POPUPS` | [Optional] Allow javascript to open new windows in Safari. Set to `true` or `false`
923
931
  `APP_IGNORE_FRAUD_WARNING` | [Optional] Prevent Safari from showing a fraudulent website warning. Set to `true` or `false`
@@ -926,6 +934,30 @@ Once your test environment is properly configured, the following **Environment V
926
934
  `LOCALE` | [Optional] Locale to set for the simulator. e.g. `fr_CA`
927
935
 
928
936
 
937
+ ### Mobile Chrome or Android browsers on Android Studio Virtual Device emulators
938
+
939
+ You can run your mobile web tests against the mobile Chrome or Android browser on emulated Android devices using Appium and Android Studio on OS X. You
940
+ must install Android Studio, the desired Android version-specific virtual device emulators, and Appium. Refer to [this page](https://github.com/appium/ruby_console/blob/master/osx.md)
941
+ for information on configuring Appium to work with the Android SDK. You must also ensure that the `appium_capybara` gem is installed and required as
942
+ described in **section 2.4 (Setup - Using Appium)** above.
943
+
944
+ The Appium server must be running prior to invoking Cucumber to run your features/scenarios. Refer to [this page](https://appium.io/docs/en/writing-running-appium/web/chromedriver/index.html)
945
+ for information on configuring Appium to use the correct version of Chromedriver required to work with the web browser supported by each Android OS version.
946
+
947
+ Once your test environment is properly configured, the following **Environment Variables** must be set as described in the table below.
948
+
949
+ **Environment Variable** | **Description**
950
+ --------------- | ----------------
951
+ `WEB_BROWSER` | Must be set to `appium`
952
+ `APP_PLATFORM_NAME` | Must be set to `Android`
953
+ `APP_BROWSER` | Must be set to `Chrome` or `Browser`
954
+ `APP_VERSION` | Must be set to `8.0`, `7.0`, or which ever Android OS version you wish to run with the Android Virtual Device
955
+ `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
956
+ `DEVICE_TYPE` | Must be set to `phone` or `tablet`
957
+ `ORIENTATION` | [Optional] Set to `portrait` or `landscape`
958
+ `APP_INITIAL_URL` | [Optional] Initial URL, default is a local welcome page. e.g. `http://www.apple.com`
959
+ `LOCALE` | [Optional] Locale to set for the simulator. e.g. `en_GB`
960
+
929
961
 
930
962
  ### Remotely hosted desktop and mobile web browsers
931
963
 
@@ -980,6 +1012,7 @@ for information regarding the specific capabilities.
980
1012
  `BS_PLATFORM` | Must be set to `MAC` (for iOS) or `ANDROID`
981
1013
  `BS_DEVICE` | Refer to `device` capability in chart
982
1014
  `BS_REAL_MOBILE` | Set to `true` if running against a real device
1015
+ `DEVICE_TYPE` | Must be set to `phone` or `tablet`
983
1016
  `TUNNELING` | Must be `true` if you are testing against internal/local servers (`true` or `false`). If `true`, the BrowserStack Local instance will be automatically started.
984
1017
  `ORIENTATION` | [Optional] Set to `portrait` or `landscape`
985
1018
  `RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`)
@@ -1019,6 +1052,7 @@ information regarding the specific capabilities.
1019
1052
  `CB_PLATFORM` | Refer to `os_api_name` capability in the sample script of the Wizard
1020
1053
  `CB_BROWSER` | Refer to `browser_api_name` capability in the sample script of the Wizard
1021
1054
  `RESOLUTION` | Refer to supported `screen_resolution` capability in the sample script of the Wizard
1055
+ `DEVICE_TYPE` | Must be set to `phone` or `tablet`
1022
1056
  `RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`)
1023
1057
 
1024
1058
 
@@ -1077,6 +1111,7 @@ regarding the specific capabilities.
1077
1111
  `TB_VERSION` | Refer to `version` capability in chart
1078
1112
  `TB_PLATFORM` | Must be set to `iOS` or `ANDROID`
1079
1113
  `TB_DEVICE` | Refer to `deviceName` capability in chart
1114
+ `DEVICE_TYPE` | Must be set to `phone` or `tablet`
1080
1115
  `TUNNELING` | Must be `true` if you are testing against internal/local servers (`true` or `false`)
1081
1116
  `ORIENTATION` | [Optional] Set to `portrait` or `landscape`
1082
1117
 
@@ -1170,18 +1205,46 @@ service(s) that you intend to connect with.
1170
1205
  #==============
1171
1206
 
1172
1207
  appium_ios: WEB_BROWSER=appium APP_PLATFORM_NAME="iOS" APP_BROWSER="Safari" <%= mobile %>
1173
- app_ios_93: --profile appium_ios APP_VERSION="9.3"
1174
- app_ios_92: --profile appium_ios APP_VERSION="9.2"
1175
- ipad_retina_93_sim: --profile app_ios_93 APP_DEVICE="iPad Retina"
1176
- ipad_pro_93_sim: --profile app_ios_93 APP_DEVICE="iPad Pro"
1177
- ipad_air_93_sim: --profile app_ios_93 APP_DEVICE="iPad Air"
1178
- ipad_air2_93_sim: --profile app_ios_93 APP_DEVICE="iPad Air 2"
1179
- ipad_2_93_sim: --profile app_ios_93 APP_DEVICE="iPad 2"
1180
- iphone_6s_plus_93_sim: --profile app_ios_93 APP_DEVICE="iPhone 6s Plus"
1181
- iphone_6s_93_sim: --profile app_ios_93 APP_DEVICE="iPhone 6s"
1182
- iphone_5s_93_sim: --profile app_ios_93 APP_DEVICE="iPhone 5s"
1183
- iphone_4s_93_sim: --profile app_ios_93 APP_DEVICE="iPhone 4s"
1208
+ app_ios_10: --profile appium_ios APP_VERSION="10.3"
1209
+ app_ios_11: --profile appium_ios APP_VERSION="11.2"
1210
+
1211
+ iphone_7_plus_10_sim: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="iPhone 7 Plus"
1212
+ iphone_7_10_sim: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="iPhone 7"
1213
+ iphone_7se_10_sim: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="iPhone SE"
1214
+ iphone_6s_plus_10_sim: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="iPhone 6s Plus"
1215
+ iphone_6s_10_sim: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="iPhone 6s"
1216
+ iphone_SE_10_sim: --profile app_ios_10 DEVICE_TYPE=phone APP_DEVICE="iPhone SE"
1217
+ iphone_X_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone X"
1218
+ iphone_8_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone 8"
1219
+ iphone_8_plus_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone 8 Plus"
1220
+ iphone_7_plus_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone 7 Plus"
1221
+ iphone_7_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone 7"
1222
+ iphone_7se_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone SE"
1223
+ iphone_6s_plus_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone 6s Plus"
1224
+ iphone_6s_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone 6s"
1225
+ iphone_SE_11_sim: --profile app_ios_11 DEVICE_TYPE=phone APP_DEVICE="iPhone SE"
1226
+
1227
+ ipad_pro_12_9_11_sim: --profile app_ios_11 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (12.9-inch)"
1228
+ ipad_pro_12_9_10_sim: --profile app_ios_10 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (12.9-inch)"
1229
+ ipad_pro_10_5_11_sim: --profile app_ios_11 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (10.5-inch)"
1230
+ ipad_pro_10_5_10_sim: --profile app_ios_10 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (10.5-inch)"
1231
+ ipad_pro_9_7_11_sim: --profile app_ios_11 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (9.7-inch)"
1232
+ ipad_pro_9_7_10_sim: --profile app_ios_10 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (9.7-inch)"
1233
+ ipad_air_2_11_sim: --profile app_ios_11 DEVICE_TYPE=tablet APP_DEVICE="iPad Air 2"
1234
+ ipad_air_2_10_sim: --profile app_ios_10 DEVICE_TYPE=tablet APP_DEVICE="iPad Air 2"
1235
+
1236
+
1237
+ #==============
1238
+ # profiles for Android mobile web browsers hosted within Android Studio Android Virtual Device emulators
1239
+ # NOTE: Requires installation of Android Studio, Android version specific virtual device simulators, Appium, and the appium_capybara gem
1240
+ #==============
1184
1241
 
1242
+ appium_android: WEB_BROWSER=appium APP_PLATFORM_NAME="Android" <%= mobile %>
1243
+ android_api_26: --profile appium_android APP_BROWSER="Chrome" APP_VERSION="8.0"
1244
+ android_api_23: --profile appium_android APP_BROWSER="Browser" APP_VERSION="6.0"
1245
+ pixel_xl_api26_sim: --profile android_api_26 DEVICE_TYPE=phone APP_DEVICE="Pixel_XL_API_26"
1246
+ pixel_2_xl_api26_sim: --profile android_api_26 DEVICE_TYPE=phone APP_DEVICE="Pixel_2_XL_API_26"
1247
+ nexus_6_api23_sim: --profile android_api_23 DEVICE_TYPE=phone APP_DEVICE="Nexus_6_API_23"
1185
1248
 
1186
1249
  #==============
1187
1250
  # profiles for remotely hosted web browsers on the BrowserStack service
@@ -1340,15 +1403,15 @@ service(s) that you intend to connect with.
1340
1403
  cb_ie11_win10: --profile cb_win10 CB_BROWSER="IE11"
1341
1404
 
1342
1405
  # CrossBrowserTesting iOS mobile browser profiles
1343
- cb_iphone6s_plus: --profile cb_mobile CB_PLATFORM="iPhone6sPlus-iOS9sim" CB_BROWSER="MblSafari9.0" RESOLUTION="1242x2208"
1344
- cb_iphone6s: --profile cb_mobile CB_PLATFORM="iPhone6s-iOS9sim" CB_BROWSER="MblSafari9.0" RESOLUTION="750x1334"
1345
- cb_iphone6_plus: --profile cb_mobile CB_PLATFORM="iPhone6Plus-iOS8sim" CB_BROWSER="MblSafari8.0" RESOLUTION="1242x2208"
1346
- cb_iphone6: --profile cb_mobile CB_PLATFORM="iPhone6-iOS8sim" CB_BROWSER="MblSafari8.0" RESOLUTION="750x1334"
1347
- cb_iphone5s: --profile cb_mobile CB_PLATFORM="iPhone5s-iOS7sim" CB_BROWSER="MblSafari7.0" RESOLUTION="640x1136"
1348
- cb_ipad_pro: --profile cb_mobile CB_PLATFORM="iPadPro-iOS9Sim" CB_BROWSER="MblSafari9.0" RESOLUTION="2732x2048"
1349
- cb_ipad_air2: --profile cb_mobile CB_PLATFORM="iPadAir2-iOS9Sim" CB_BROWSER="MblSafari9.0" RESOLUTION="2048x1536"
1350
- cb_ipad_air: --profile cb_mobile CB_PLATFORM="iPadAir-iOS8Sim" CB_BROWSER="MblSafari8.0" RESOLUTION="2048x1536"
1351
- cb_ipad_mini: --profile cb_mobile CB_PLATFORM="iPadMiniRetina-iOS7Sim" CB_BROWSER="MblSafari7.0" RESOLUTION="2048x1536"
1406
+ cb_iphone6s_plus: --profile cb_mobile DEVICE_TYPE=phone CB_PLATFORM="iPhone6sPlus-iOS9sim" CB_BROWSER="MblSafari9.0" RESOLUTION="1242x2208"
1407
+ cb_iphone6s: --profile cb_mobile DEVICE_TYPE=phone CB_PLATFORM="iPhone6s-iOS9sim" CB_BROWSER="MblSafari9.0" RESOLUTION="750x1334"
1408
+ cb_iphone6_plus: --profile cb_mobile DEVICE_TYPE=phone CB_PLATFORM="iPhone6Plus-iOS8sim" CB_BROWSER="MblSafari8.0" RESOLUTION="1242x2208"
1409
+ cb_iphone6: --profile cb_mobile DEVICE_TYPE=phone CB_PLATFORM="iPhone6-iOS8sim" CB_BROWSER="MblSafari8.0" RESOLUTION="750x1334"
1410
+ cb_iphone5s: --profile cb_mobile DEVICE_TYPE=phone CB_PLATFORM="iPhone5s-iOS7sim" CB_BROWSER="MblSafari7.0" RESOLUTION="640x1136"
1411
+ cb_ipad_pro: --profile cb_mobile DEVICE_TYPE=tablet CB_PLATFORM="iPadPro-iOS9Sim" CB_BROWSER="MblSafari9.0" RESOLUTION="2732x2048"
1412
+ cb_ipad_air2: --profile cb_mobile DEVICE_TYPE=tablet CB_PLATFORM="iPadAir2-iOS9Sim" CB_BROWSER="MblSafari9.0" RESOLUTION="2048x1536"
1413
+ cb_ipad_air: --profile cb_mobile DEVICE_TYPE=tablet CB_PLATFORM="iPadAir-iOS8Sim" CB_BROWSER="MblSafari8.0" RESOLUTION="2048x1536"
1414
+ cb_ipad_mini: --profile cb_mobile DEVICE_TYPE=tablet CB_PLATFORM="iPadMiniRetina-iOS7Sim" CB_BROWSER="MblSafari7.0" RESOLUTION="2048x1536"
1352
1415
 
1353
1416
  # CrossBrowserTesting Android mobile browser profiles
1354
1417
  cb_nexus7: --profile cb_mobile CB_PLATFORM="Nexus7-And42" CB_BROWSER="MblChrome37" RESOLUTION="800x1280"
@@ -1451,18 +1514,18 @@ service(s) that you intend to connect with.
1451
1514
 
1452
1515
  # TestingBot iOS mobile browser profiles
1453
1516
  tb_ios: --profile tb_mobile TB_OS="MAC" TB_BROWSER="safari" TB_PLATFORM="iOS"
1454
- tb_iphone6s_plus_10: --profile tb_ios TB_VERSION="10.0" TB_DEVICE="iPhone 6s Plus"
1455
- tb_iphone6s_plus_93: --profile tb_ios TB_VERSION="9.3" TB_DEVICE="iPhone 6s Plus"
1456
- tb_iphone6_plus_10: --profile tb_ios TB_VERSION="10.0" TB_DEVICE="iPhone 6 Plus"
1457
- tb_iphone6_plus_93: --profile tb_ios TB_VERSION="9.3" TB_DEVICE="iPhone 6 Plus"
1458
- tb_iphone6s_10: --profile tb_ios TB_VERSION="10.0" TB_DEVICE="iPhone 6s"
1459
- tb_iphone6s_93: --profile tb_ios TB_VERSION="9.3" TB_DEVICE="iPhone 6s"
1460
- tb_iphone5s_10: --profile tb_ios TB_VERSION="10.0" TB_DEVICE="iPhone 5s"
1461
- tb_iphone5s_93: --profile tb_ios TB_VERSION="9.3" TB_DEVICE="iPhone 5s"
1462
- tb_ipad_pro_10: --profile tb_ios TB_VERSION="10.0" TB_DEVICE="iPad Pro"
1463
- tb_ipad_pro_93: --profile tb_ios TB_VERSION="9.3" TB_DEVICE="iPad Pro"
1464
- tb_ipad_air2_10: --profile tb_ios TB_VERSION="10.0" TB_DEVICE="iPad Air 2"
1465
- tb_ipad_air2_93: --profile tb_ios TB_VERSION="9.3" TB_DEVICE="iPad Air 2"
1517
+ tb_iphone6s_plus_10: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="10.0" TB_DEVICE="iPhone 6s Plus"
1518
+ tb_iphone6s_plus_93: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="9.3" TB_DEVICE="iPhone 6s Plus"
1519
+ tb_iphone6_plus_10: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="10.0" TB_DEVICE="iPhone 6 Plus"
1520
+ tb_iphone6_plus_93: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="9.3" TB_DEVICE="iPhone 6 Plus"
1521
+ tb_iphone6s_10: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="10.0" TB_DEVICE="iPhone 6s"
1522
+ tb_iphone6s_93: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="9.3" TB_DEVICE="iPhone 6s"
1523
+ tb_iphone5s_10: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="10.0" TB_DEVICE="iPhone 5s"
1524
+ tb_iphone5s_93: --profile tb_ios DEVICE_TYPE=phone TB_VERSION="9.3" TB_DEVICE="iPhone 5s"
1525
+ tb_ipad_pro_10: --profile tb_ios DEVICE_TYPE=tablet TB_VERSION="10.0" TB_DEVICE="iPad Pro"
1526
+ tb_ipad_pro_93: --profile tb_ios DEVICE_TYPE=tablet TB_VERSION="9.3" TB_DEVICE="iPad Pro"
1527
+ tb_ipad_air2_10: --profile tb_ios DEVICE_TYPE=tablet TB_VERSION="10.0" TB_DEVICE="iPad Air 2"
1528
+ tb_ipad_air2_93: --profile tb_ios DEVICE_TYPE=tablet TB_VERSION="9.3" TB_DEVICE="iPad Air 2"
1466
1529
 
1467
1530
 
1468
1531
  # TestingBot Android mobile browser profiles
@@ -26,8 +26,12 @@ module TestCentricity
26
26
  obj.all(@list_item).collect(&:text)
27
27
  end
28
28
 
29
- def get_list_item(index)
30
- items = get_list_items
29
+ def get_list_item(index, visible = true)
30
+ if visible
31
+ items = get_list_items
32
+ else
33
+ items = get_all_list_items
34
+ end
31
35
  items[index - 1]
32
36
  end
33
37
 
@@ -37,6 +41,19 @@ module TestCentricity
37
41
  obj.all(@list_item).count
38
42
  end
39
43
 
44
+ def get_all_list_items(element_spec = nil)
45
+ define_list_elements(element_spec) unless element_spec.nil?
46
+ obj, = find_element
47
+ object_not_found_exception(obj, nil)
48
+ obj.all(@list_item, :visible => :all).collect(&:text)
49
+ end
50
+
51
+ def get_all_items_count
52
+ obj, = find_element
53
+ object_not_found_exception(obj, nil)
54
+ obj.all(@list_item, :visible => :all).count
55
+ end
56
+
40
57
  def verify_list_items(expected, enqueue = false)
41
58
  actual = get_list_items
42
59
  enqueue ?
@@ -520,6 +520,14 @@ module TestCentricity
520
520
  actual = ui_object.get_list_items
521
521
  when :optioncount, :itemcount
522
522
  actual = ui_object.get_item_count
523
+
524
+
525
+ when :all_items, :all_list_items
526
+ actual = ui_object.get_all_list_items
527
+ when :all_items_count
528
+ actual = ui_object.get_all_items_count
529
+
530
+
523
531
  when :column_headers
524
532
  actual = ui_object.get_header_columns
525
533
  when :siebel_options
@@ -86,6 +86,20 @@ module TestCentricity
86
86
  items
87
87
  end
88
88
 
89
+ def get_all_items_count
90
+ raise 'No parent list defined' if @parent_list.nil?
91
+ @parent_list.get_all_items_count
92
+ end
93
+
94
+ def get_all_list_items
95
+ items = []
96
+ (1..get_all_items_count).each do |item|
97
+ set_list_index(nil, item)
98
+ items.push(get_value(:all))
99
+ end
100
+ items
101
+ end
102
+
89
103
  def verify_list_items(expected, enqueue = false)
90
104
  actual = get_list_items
91
105
  enqueue ?
@@ -542,6 +556,18 @@ module TestCentricity
542
556
  !visible?
543
557
  end
544
558
 
559
+ # Is section object displayed in browser window?
560
+ #
561
+ # @return [Boolean]
562
+ # @example
563
+ # navigation_toolbar.displayed??
564
+ #
565
+ def displayed?
566
+ section, = find_section
567
+ raise "Section object '#{get_name}' (#{get_locator}) not found" unless section
568
+ section.displayed?
569
+ end
570
+
545
571
  # Wait until the Section object exists, or until the specified wait time has expired. If the wait time is nil, then
546
572
  # the wait time will be Capybara.default_max_wait_time.
547
573
  #
@@ -667,6 +693,14 @@ module TestCentricity
667
693
  actual = ui_object.get_list_items
668
694
  when :optioncount, :itemcount
669
695
  actual = ui_object.get_item_count
696
+
697
+
698
+ when :all_items, :all_list_items
699
+ actual = ui_object.get_all_list_items
700
+ when :all_items_count
701
+ actual = ui_object.get_all_items_count
702
+
703
+
670
704
  when :column_headers
671
705
  actual = ui_object.get_header_columns
672
706
  when :siebel_options
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '2.3.9'
2
+ VERSION = '2.3.10'
3
3
  end
@@ -170,6 +170,7 @@ module TestCentricity
170
170
  Environ.platform = :mobile
171
171
  Environ.device_name = ENV['APP_DEVICE']
172
172
  Environ.device_os = ENV['APP_PLATFORM_NAME']
173
+ Environ.device_type = ENV['DEVICE_TYPE'] if ENV['DEVICE_TYPE']
173
174
  Environ.device_orientation = ENV['ORIENTATION'] if ENV['ORIENTATION']
174
175
  Capybara.default_driver = :appium
175
176
  endpoint = 'http://localhost:4723/wd/hub'
@@ -208,48 +209,48 @@ module TestCentricity
208
209
  browser = ENV['WEB_BROWSER']
209
210
 
210
211
  case browser.downcase.to_sym
211
- when :firefox, :chrome, :ie, :safari, :edge
212
- Environ.platform = :desktop
213
- else
214
- Environ.platform = :mobile
215
- Environ.device_name = Browsers.mobile_device_name(browser)
212
+ when :firefox, :chrome, :ie, :safari, :edge
213
+ Environ.platform = :desktop
214
+ else
215
+ Environ.platform = :mobile
216
+ Environ.device_name = Browsers.mobile_device_name(browser)
216
217
  end
217
218
 
218
219
  Capybara.default_driver = :selenium
219
220
  Capybara.register_driver :selenium do |app|
220
221
  case browser.downcase.to_sym
221
- when :ie, :safari, :edge
222
- Capybara::Selenium::Driver.new(app, :browser => browser.to_sym)
222
+ when :ie, :safari, :edge
223
+ Capybara::Selenium::Driver.new(app, :browser => browser.to_sym)
223
224
 
225
+ when :firefox
226
+ if ENV['LOCALE']
227
+ profile = Selenium::WebDriver::Firefox::Profile.new
228
+ profile['intl.accept_languages'] = ENV['LOCALE']
229
+ Capybara::Selenium::Driver.new(app, :profile => profile)
230
+ else
231
+ Capybara::Selenium::Driver.new(app, :browser => :firefox)
232
+ end
233
+
234
+ when :chrome
235
+ ENV['LOCALE'] ? args = ['--disable-infobars', "--lang=#{ENV['LOCALE']}"] : args = ['--disable-infobars']
236
+ Capybara::Selenium::Driver.new(app, :browser => :chrome, :args => args)
237
+
238
+ else
239
+ user_agent = Browsers.mobile_device_agent(browser)
240
+ ENV['HOST_BROWSER'] ? host_browser = ENV['HOST_BROWSER'].downcase.to_sym : host_browser = :firefox
241
+ case host_browser
224
242
  when :firefox
225
- if ENV['LOCALE']
226
- profile = Selenium::WebDriver::Firefox::Profile.new
227
- profile['intl.accept_languages'] = ENV['LOCALE']
228
- Capybara::Selenium::Driver.new(app, :profile => profile)
229
- else
230
- Capybara::Selenium::Driver.new(app, :browser => :firefox)
231
- end
243
+ profile = Selenium::WebDriver::Firefox::Profile.new
244
+ profile['general.useragent.override'] = user_agent
245
+ profile['intl.accept_languages'] = ENV['LOCALE'] if ENV['LOCALE']
246
+ Capybara::Selenium::Driver.new(app, :profile => profile)
232
247
 
233
248
  when :chrome
234
- ENV['LOCALE'] ? args = ['--disable-infobars', "--lang=#{ENV['LOCALE']}"] : args = ['--disable-infobars']
249
+ ENV['LOCALE'] ?
250
+ args = ["--user-agent='#{user_agent}'", "--lang=#{ENV['LOCALE']}", '--disable-infobars'] :
251
+ args = ["--user-agent='#{user_agent}'", '--disable-infobars']
235
252
  Capybara::Selenium::Driver.new(app, :browser => :chrome, :args => args)
236
-
237
- else
238
- user_agent = Browsers.mobile_device_agent(browser)
239
- ENV['HOST_BROWSER'] ? host_browser = ENV['HOST_BROWSER'].downcase.to_sym : host_browser = :firefox
240
- case host_browser
241
- when :firefox
242
- profile = Selenium::WebDriver::Firefox::Profile.new
243
- profile['general.useragent.override'] = user_agent
244
- profile['intl.accept_languages'] = ENV['LOCALE'] if ENV['LOCALE']
245
- Capybara::Selenium::Driver.new(app, :profile => profile)
246
-
247
- when :chrome
248
- ENV['LOCALE'] ?
249
- args = ["--user-agent='#{user_agent}'", "--lang=#{ENV['LOCALE']}", '--disable-infobars'] :
250
- args = ["--user-agent='#{user_agent}'", '--disable-infobars']
251
- Capybara::Selenium::Driver.new(app, :browser => :chrome, :args => args)
252
- end
253
+ end
253
254
  end
254
255
  end
255
256
  end
@@ -328,8 +329,6 @@ module TestCentricity
328
329
  Environ.device_name = ENV['BS_DEVICE']
329
330
  Environ.device_os = ENV['BS_OS']
330
331
  Environ.device_orientation = ENV['ORIENTATION'] if ENV['ORIENTATION']
331
- Environ.device_type = ENV['DEVICE_TYPE'] if ENV['DEVICE_TYPE']
332
-
333
332
  elsif ENV['BS_OS']
334
333
  Environ.os = "#{ENV['BS_OS']} #{ENV['BS_OS_VERSION']}"
335
334
  end
@@ -405,6 +404,7 @@ module TestCentricity
405
404
 
406
405
  Environ.browser = browser
407
406
  Environ.tunneling = ENV['TUNNELING'] if ENV['TUNNELING']
407
+ Environ.device_type = ENV['DEVICE_TYPE'] if ENV['DEVICE_TYPE']
408
408
 
409
409
  Capybara.default_driver = :browserstack
410
410
  Capybara.run_server = false
@@ -16,7 +16,8 @@ Gem::Specification.new do |spec|
16
16
  for use with Cucumber, Capybara, and Selenium-Webdriver. The TestCentricity™ Web gem supports running automated tests
17
17
  against locally hosted desktop browsers (Firefox, Chrome, Safari, or IE), locally hosted emulated mobile browsers (iOS,
18
18
  Android, Windows Phone, Blackberry, Kindle Fire) running within a locally hosted instance of Chrome, a "headless" browser (using
19
- Poltergeist and PhantomJS), mobile Safari browsers on iOS device simulators (using Appium and XCode on OS X), or cloud hosted
19
+ Poltergeist and PhantomJS), mobile Safari browsers on iOS device simulators (using Appium and XCode on OS X), mobile Chrome
20
+ or Android browsers on Android Studio virtual device emulators (using Appium and Android Studio on OS X), or cloud hosted
20
21
  desktop or mobile web browsers (using the BrowserStack, Sauce Labs, CrossBrowserTesting, or TestingBot services).}
21
22
  spec.homepage = ''
22
23
  spec.license = 'BSD3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.9
4
+ version: 2.3.10
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: 2018-01-27 00:00:00.000000000 Z
11
+ date: 2018-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -196,7 +196,8 @@ description: |2-
196
196
  for use with Cucumber, Capybara, and Selenium-Webdriver. The TestCentricity™ Web gem supports running automated tests
197
197
  against locally hosted desktop browsers (Firefox, Chrome, Safari, or IE), locally hosted emulated mobile browsers (iOS,
198
198
  Android, Windows Phone, Blackberry, Kindle Fire) running within a locally hosted instance of Chrome, a "headless" browser (using
199
- Poltergeist and PhantomJS), mobile Safari browsers on iOS device simulators (using Appium and XCode on OS X), or cloud hosted
199
+ Poltergeist and PhantomJS), mobile Safari browsers on iOS device simulators (using Appium and XCode on OS X), mobile Chrome
200
+ or Android browsers on Android Studio virtual device emulators (using Appium and Android Studio on OS X), or cloud hosted
200
201
  desktop or mobile web browsers (using the BrowserStack, Sauce Labs, CrossBrowserTesting, or TestingBot services).
201
202
  email:
202
203
  - testcentricity@gmail.com