testcentricity_web 3.0.5 → 3.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +11 -1
- data/README.md +106 -92
- data/lib/devices/devices.yml +6 -6
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/webdriver_helper.rb +46 -12
- data/lib/testcentricity_web/web_elements/select_list.rb +13 -5
- data/testcentricity_web.gemspec +17 -17
- metadata +15 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c1b260cf07c5bbde1a8e388a38605c85da10263
|
4
|
+
data.tar.gz: 001ed7c67c0146160a1fd7d1636fd9b5feb054e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0014e310b243eb33481428654b7918d8ff46bcbf70d28912aacd4b09969bdeb1cf0f759ba7ebd6b0a8c54dcc917f4156484ca98810c134b8a65fa9312a30cb6a
|
7
|
+
data.tar.gz: 179a4593392024d766230348ac9b049bf503006fc7bf3ead0d0384dc996ed75a1eebc1e7db6bb90794649afc0bfa3003cddaab4c7aae95afe532c0cba3ada175
|
data/HISTORY.md
CHANGED
@@ -1,7 +1,17 @@
|
|
1
|
+
# HISTORY
|
2
|
+
|
3
|
+
###Version 3.0.6
|
4
|
+
|
5
|
+
* Added support for connecting to and running your tests on cloud hosted browsers on the Gridlastic cloud platform.
|
6
|
+
* Added support for specifying Selenium WebDriver version, browser-specific WebDriver version (for Firefox, IE, and Safari), and browser console
|
7
|
+
logs when running tests on BrowserStack hosted browsers. Refer to **section 8.5.1 (Remote desktop browsers on the BrowserStack service)** in the README.
|
8
|
+
* Updated device profiles for iPhone 7 (iOS 11) with Mobile Firefox browser and iPad (iOS 11) with Mobile Firefox browser.
|
9
|
+
* Updated device profiles for iPhone 7 (iOS 11) with Mobile Edge browser and iPad (iOS 11) with Mobile Edge browser.
|
10
|
+
* Updated device profiles for iPhone 7 (iOS 11) with Mobile Chrome browser and iPad (iOS 11) with Mobile Chrome browser.
|
1
11
|
|
2
12
|
###Version 3.0.5
|
3
13
|
|
4
|
-
* Added `Environ.headless` method. Will return `true` if testing against a *headless* instance of Chrome or Firefox
|
14
|
+
* Added `Environ.headless` method. Will return `true` if testing against a *headless* instance of Chrome or Firefox.
|
5
15
|
|
6
16
|
###Version 3.0.4
|
7
17
|
|
data/README.md
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/testcentricity_web.svg)](https://badge.fury.io/rb/testcentricity_web) [![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause)
|
4
4
|
|
5
5
|
|
6
|
-
The TestCentricity™ Web core generic framework for desktop and mobile web
|
7
|
-
use with Cucumber, Capybara (version 3.x), and Selenium-Webdriver (version 3.x).
|
6
|
+
The TestCentricity™ Web core generic framework for desktop and mobile web browser-based application testing implements a Page Object and Data
|
7
|
+
Object Model DSL for use with Cucumber, Capybara (version 3.x), and Selenium-Webdriver (version 3.x).
|
8
8
|
|
9
9
|
An example project that demonstrates the implementation of a page object model framework using Cucumber and TestCentricity™ can be found [here](https://github.com/TestCentricity/tc_web_sample).
|
10
10
|
|
@@ -15,8 +15,8 @@ The TestCentricity™ Web gem supports running automated tests against the follo
|
|
15
15
|
* mobile Safari browsers on iOS device simulators or physical iOS devices (using Appium and XCode on OS X)
|
16
16
|
* mobile Chrome or Android browsers on Android Studio virtual device emulators (using Appium and Android Studio on OS X)
|
17
17
|
* 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),
|
18
|
-
[Sauce Labs](https://saucelabs.com/open-source#automated-testing-platform), [CrossBrowserTesting](https://crossbrowsertesting.com/selenium-testing),
|
19
|
-
[TestingBot](https://testingbot.com/features) services.
|
18
|
+
[Sauce Labs](https://saucelabs.com/open-source#automated-testing-platform), [CrossBrowserTesting](https://crossbrowsertesting.com/selenium-testing),
|
19
|
+
[TestingBot](https://testingbot.com/features), or [Gridlastic](https://www.gridlastic.com/test-environments.html) services.
|
20
20
|
* web portals utilizing JavaScript front end application frameworks like Ember, React, Angular, and GWT
|
21
21
|
* enterprise web portals build using Siebel Open UI
|
22
22
|
|
@@ -25,9 +25,18 @@ The TestCentricity™ Web gem supports running automated tests against the follo
|
|
25
25
|
|
26
26
|
A complete history of bug fixes and new features can be found in the {file:HISTORY.md HISTORY} file.
|
27
27
|
|
28
|
+
###Version 3.0.6
|
29
|
+
|
30
|
+
* Added support for connecting to and running your tests on cloud hosted browsers on the Gridlastic cloud platform.
|
31
|
+
* Added support for specifying Selenium WebDriver version, browser-specific WebDriver version (for Firefox, IE, and Safari), and browser console
|
32
|
+
logs when running tests on BrowserStack hosted browsers. Refer to **section 8.5.1 (Remote desktop browsers on the BrowserStack service)** below.
|
33
|
+
* Updated device profiles for iPhone 7 (iOS 11) with Mobile Firefox browser and iPad (iOS 11) with Mobile Firefox browser.
|
34
|
+
* Updated device profiles for iPhone 7 (iOS 11) with Mobile Edge browser and iPad (iOS 11) with Mobile Edge browser.
|
35
|
+
* Updated device profiles for iPhone 7 (iOS 11) with Mobile Chrome browser and iPad (iOS 11) with Mobile Chrome browser.
|
36
|
+
|
28
37
|
###Version 3.0.5
|
29
38
|
|
30
|
-
* Added `Environ.headless` method. Will return `true` if testing against a *headless* instance of Chrome or Firefox
|
39
|
+
* Added `Environ.headless` method. Will return `true` if testing against a *headless* instance of Chrome or Firefox.
|
31
40
|
|
32
41
|
###Version 3.0.4
|
33
42
|
|
@@ -741,9 +750,9 @@ the `WEB_BROWSER` Environment Variable must be set to one of the values from the
|
|
741
750
|
`ipad` |`chrome` |1024 x 768 |landscape |iOS 10
|
742
751
|
`ipad_pro` |`chrome` |1366 x 1024|landscape |iOS 11
|
743
752
|
`ipad_pro_10_5` |`chrome` |1112 x 834 |landscape |iOS 11
|
744
|
-
`ipad_chrome` |`chrome` |1024 x 768 |landscape |iOS
|
745
|
-
`ipad_firefox` |`chrome` |1024 x 768 |landscape |iOS
|
746
|
-
`ipad_edge` |`chrome` |1024 x 768 |landscape |iOS
|
753
|
+
`ipad_chrome` |`chrome` |1024 x 768 |landscape |iOS 11 - Mobile Chrome browser for iOS
|
754
|
+
`ipad_firefox` |`chrome` |1024 x 768 |landscape |iOS 11 - Mobile Firefox browser for iOS
|
755
|
+
`ipad_edge` |`chrome` |1024 x 768 |landscape |iOS 11 - Mobile Edge browser for iOS
|
747
756
|
`android_tablet` |`chrome` |1024 x 768 |landscape |Android 3.0
|
748
757
|
`kindle_fire` |`chrome` |1024 x 600 |landscape |
|
749
758
|
`kindle_firehd7` |`chrome` |800 x 480 |landscape |Fire OS 3
|
@@ -828,7 +837,7 @@ Once your test environment is properly configured, the following **Environment V
|
|
828
837
|
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
|
829
838
|
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)
|
830
839
|
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
|
831
|
-
described in **section
|
840
|
+
described in **section 3.3 (Setup - Using Appium)** above.
|
832
841
|
|
833
842
|
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)
|
834
843
|
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.
|
@@ -863,23 +872,26 @@ staging server inside your LAN, you must set the `TUNNELING` Environment Variabl
|
|
863
872
|
#### Remote desktop browsers on the BrowserStack service
|
864
873
|
|
865
874
|
For remotely hosted desktop web browsers on the BrowserStack service, the following **Environment Variables** must be set as described in
|
866
|
-
the table below. Refer to the [Browserstack-specific capabilities chart page](https://www.browserstack.com/automate/capabilities
|
875
|
+
the table below. Refer to the [Browserstack-specific capabilities chart page](https://www.browserstack.com/automate/capabilities)
|
867
876
|
for information regarding the specific capabilities.
|
868
877
|
|
869
878
|
**Environment Variable** | **Description**
|
870
|
-
|
871
|
-
`WEB_BROWSER`
|
872
|
-
`BS_USERNAME`
|
873
|
-
`BS_AUTHKEY`
|
874
|
-
`BS_OS`
|
875
|
-
`BS_OS_VERSION`
|
876
|
-
`BS_BROWSER`
|
877
|
-
`BS_VERSION`
|
878
|
-
`TUNNELING`
|
879
|
-
`RESOLUTION`
|
880
|
-
`BROWSER_SIZE`
|
881
|
-
`RECORD_VIDEO`
|
882
|
-
`TIME_ZONE`
|
879
|
+
------------------ | ----------------
|
880
|
+
`WEB_BROWSER` | Must be set to `browserstack`
|
881
|
+
`BS_USERNAME` | Must be set to your BrowserStack account user name
|
882
|
+
`BS_AUTHKEY` | Must be set to your BrowserStack account access key
|
883
|
+
`BS_OS` | Must be set to `OS X` or `Windows`
|
884
|
+
`BS_OS_VERSION` | Refer to `os_version` capability in chart
|
885
|
+
`BS_BROWSER` | Refer to `browser` capability in chart
|
886
|
+
`BS_VERSION` | [Optional] Refer to `browser_version` capability in chart. If not specified, latest stable version of browser will be used.
|
887
|
+
`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.
|
888
|
+
`RESOLUTION` | [Optional] Refer to supported screen `resolution` capability in chart
|
889
|
+
`BROWSER_SIZE` | [Optional] Specify width, height of browser window
|
890
|
+
`RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`)
|
891
|
+
`TIME_ZONE` | [Optional] Specify custom time zone. Refer to `browserstack.timezone` capability in chart
|
892
|
+
`SELENIUM_VERSION` | [Optional] Specify Selenium WebDriver version to use
|
893
|
+
`CONSOLE_LOGS` | [Optional] Used to capture browser console logs. Refer to `browserstack.console` capability in chart
|
894
|
+
`WD_VERSION` | [Optional] Specify browser-specific WebDriver version to use. Refer to `browserstack.geckodriver`, `browserstack.ie.driver`, and `browserstack.safari.driver` capabilities in chart
|
883
895
|
|
884
896
|
If the BrowserStack Local instance is running (`TUNNELING` Environment Variable is `true`), call the`TestCentricity::WebDriverConnect.close_tunnel` method
|
885
897
|
upon completion of your test suite to stop the Local instance. Place the code shown below in your `env.rb` file.
|
@@ -893,7 +905,7 @@ upon completion of your test suite to stop the Local instance. Place the code sh
|
|
893
905
|
#### Remote mobile browsers on the BrowserStack service
|
894
906
|
|
895
907
|
For remotely hosted mobile web browsers on the BrowserStack service, the following **Environment Variables** must be set as described in
|
896
|
-
the table below. Refer to the [Browserstack-specific capabilities chart page](https://www.browserstack.com/automate/capabilities
|
908
|
+
the table below. Refer to the [Browserstack-specific capabilities chart page](https://www.browserstack.com/automate/capabilities)
|
897
909
|
for information regarding the specific capabilities.
|
898
910
|
|
899
911
|
**Environment Variable** | **Description**
|
@@ -911,6 +923,7 @@ for information regarding the specific capabilities.
|
|
911
923
|
`ORIENTATION` | [Optional] Set to `portrait` or `landscape`
|
912
924
|
`RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`)
|
913
925
|
`TIME_ZONE` | [Optional] Specify custom time zone. Refer to `browserstack.timezone` capability in chart
|
926
|
+
`CONSOLE_LOGS` | [Optional] Used to capture browser console logs. Refer to `browserstack.console` capability in chart
|
914
927
|
|
915
928
|
|
916
929
|
|
@@ -1010,6 +1023,26 @@ regarding the specific capabilities.
|
|
1010
1023
|
`ORIENTATION` | [Optional] Set to `portrait` or `landscape`
|
1011
1024
|
|
1012
1025
|
|
1026
|
+
#### Remote desktop browsers on the Gridlastic service
|
1027
|
+
|
1028
|
+
For remotely hosted desktop web browsers on the Gridlastic service, the following **Environment Variables** must be set as described in
|
1029
|
+
the table below. Refer to the [Gridlastic Selenium Grid Test Environments](https://www.gridlastic.com/test-environments.html) for information
|
1030
|
+
regarding the specific capabilities.
|
1031
|
+
|
1032
|
+
**Environment Variable** | **Description**
|
1033
|
+
--------------- | ----------------
|
1034
|
+
`WEB_BROWSER` | Must be set to `gridlastic`
|
1035
|
+
`GL_USERNAME` | Must be set to your Gridlastic account user name
|
1036
|
+
`GL_AUTHKEY` | Must be set to your Gridlastic account access key
|
1037
|
+
`GL_SUBDOMAIN` | Must be set to your Gridlastic subdomain
|
1038
|
+
`GL_OS` | Refer to `platform` capability in chart
|
1039
|
+
`GL_BROWSER` | Refer to `browserName` capability in chart
|
1040
|
+
`GL_VERSION` | Refer to `version` capability in chart
|
1041
|
+
`GL_PLATFORM` | Must be set to `windows` when running on Windows operating systems
|
1042
|
+
`RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`)
|
1043
|
+
`VIDEO_URL` | [Optional] Video Files Location Endpoint URL shown in the **Your Selenium Grid Credentials** section of the Gridlastic Dashboard
|
1044
|
+
|
1045
|
+
|
1013
1046
|
### Using Browser specific Profiles in cucumber.yml
|
1014
1047
|
|
1015
1048
|
While you can set **Environment Variables** in the command line when invoking Cucumber, a preferred method of specifying and managing
|
@@ -1022,8 +1055,9 @@ replace the *INSERT USER NAME HERE* and *INSERT PASSWORD HERE* placeholder text
|
|
1022
1055
|
service(s) that you intend to connect with.
|
1023
1056
|
|
1024
1057
|
|
1025
|
-
<% desktop = "--tags
|
1026
|
-
<%
|
1058
|
+
<% desktop = "--tags @desktop --require features BROWSER_TILE=true BROWSER_SIZE=1500,1000" %>
|
1059
|
+
<% tablet = "--tags @desktop --require features BROWSER_TILE=true" %>
|
1060
|
+
<% mobile = "--tags @mobile --require features BROWSER_TILE=true" %>
|
1027
1061
|
|
1028
1062
|
#==============
|
1029
1063
|
# profiles for locally hosted desktop web browsers
|
@@ -1040,16 +1074,15 @@ service(s) that you intend to connect with.
|
|
1040
1074
|
|
1041
1075
|
|
1042
1076
|
#==============
|
1043
|
-
# profiles for locally hosted mobile web browsers (emulated locally in
|
1044
|
-
# NOTE: to host emulated mobile browsers in Chrome set the HOST_BROWSER=chrome
|
1077
|
+
# profiles for locally hosted mobile web browsers (emulated locally in Chrome browser)
|
1045
1078
|
#==============
|
1046
1079
|
|
1047
|
-
ipad: WEB_BROWSER=ipad HOST_BROWSER=chrome <%=
|
1048
|
-
ipad_pro: WEB_BROWSER=ipad_pro HOST_BROWSER=chrome <%=
|
1049
|
-
ipad_pro_10_5: WEB_BROWSER=ipad_pro_10_5 HOST_BROWSER=chrome <%=
|
1050
|
-
ipad_chrome: WEB_BROWSER=ipad_chrome HOST_BROWSER=chrome <%=
|
1051
|
-
ipad_firefox: WEB_BROWSER=ipad_firefox HOST_BROWSER=chrome <%=
|
1052
|
-
ipad_edge: WEB_BROWSER=ipad_edge HOST_BROWSER=chrome <%=
|
1080
|
+
ipad: WEB_BROWSER=ipad HOST_BROWSER=chrome <%= tablet %>
|
1081
|
+
ipad_pro: WEB_BROWSER=ipad_pro HOST_BROWSER=chrome <%= tablet %>
|
1082
|
+
ipad_pro_10_5: WEB_BROWSER=ipad_pro_10_5 HOST_BROWSER=chrome <%= tablet %>
|
1083
|
+
ipad_chrome: WEB_BROWSER=ipad_chrome HOST_BROWSER=chrome <%= tablet %>
|
1084
|
+
ipad_firefox: WEB_BROWSER=ipad_firefox HOST_BROWSER=chrome <%= tablet %>
|
1085
|
+
ipad_edge: WEB_BROWSER=ipad_edge HOST_BROWSER=chrome <%= tablet %>
|
1053
1086
|
iphone: WEB_BROWSER=iphone HOST_BROWSER=chrome <%= mobile %>
|
1054
1087
|
iphone4: WEB_BROWSER=iphone4 HOST_BROWSER=chrome <%= mobile %>
|
1055
1088
|
iphone5: WEB_BROWSER=iphone5 HOST_BROWSER=chrome <%= mobile %>
|
@@ -1065,17 +1098,17 @@ service(s) that you intend to connect with.
|
|
1065
1098
|
iphoneX: WEB_BROWSER=iphonex HOST_BROWSER=chrome <%= mobile %>
|
1066
1099
|
android_phone: WEB_BROWSER=android_phone HOST_BROWSER=chrome <%= mobile %>
|
1067
1100
|
nexus6: WEB_BROWSER=nexus6 HOST_BROWSER=chrome <%= mobile %>
|
1068
|
-
android_tablet: WEB_BROWSER=android_tablet HOST_BROWSER=chrome <%=
|
1069
|
-
kindle_fire: WEB_BROWSER=kindle_fire HOST_BROWSER=chrome <%=
|
1070
|
-
kindle_firehd7: WEB_BROWSER=kindle_firehd7 HOST_BROWSER=chrome <%=
|
1071
|
-
kindle_firehd8: WEB_BROWSER=kindle_firehd8 HOST_BROWSER=chrome <%=
|
1101
|
+
android_tablet: WEB_BROWSER=android_tablet HOST_BROWSER=chrome <%= tablet %>
|
1102
|
+
kindle_fire: WEB_BROWSER=kindle_fire HOST_BROWSER=chrome <%= tablet %>
|
1103
|
+
kindle_firehd7: WEB_BROWSER=kindle_firehd7 HOST_BROWSER=chrome <%= tablet %>
|
1104
|
+
kindle_firehd8: WEB_BROWSER=kindle_firehd8 HOST_BROWSER=chrome <%= tablet %>
|
1072
1105
|
kindle_firehd10: WEB_BROWSER=kindle_firehd10 HOST_BROWSER=chrome <%= tablet %>
|
1073
|
-
surface: WEB_BROWSER=surface HOST_BROWSER=chrome <%=
|
1074
|
-
blackberry_playbook: WEB_BROWSER=blackberry_playbook HOST_BROWSER=chrome <%=
|
1075
|
-
samsung_galaxy_tab: WEB_BROWSER=samsung_galaxy_tab HOST_BROWSER=chrome <%=
|
1076
|
-
google_nexus7: WEB_BROWSER=google_nexus7 HOST_BROWSER=chrome <%=
|
1077
|
-
google_nexus9: WEB_BROWSER=google_nexus9 HOST_BROWSER=chrome <%=
|
1078
|
-
google_nexus10: WEB_BROWSER=google_nexus10 HOST_BROWSER=chrome <%=
|
1106
|
+
surface: WEB_BROWSER=surface HOST_BROWSER=chrome <%= tablet %>
|
1107
|
+
blackberry_playbook: WEB_BROWSER=blackberry_playbook HOST_BROWSER=chrome <%= tablet %>
|
1108
|
+
samsung_galaxy_tab: WEB_BROWSER=samsung_galaxy_tab HOST_BROWSER=chrome <%= tablet %>
|
1109
|
+
google_nexus7: WEB_BROWSER=google_nexus7 HOST_BROWSER=chrome <%= tablet %>
|
1110
|
+
google_nexus9: WEB_BROWSER=google_nexus9 HOST_BROWSER=chrome <%= tablet %>
|
1111
|
+
google_nexus10: WEB_BROWSER=google_nexus10 HOST_BROWSER=chrome <%= tablet %>
|
1079
1112
|
samsung_galaxy_s4: WEB_BROWSER=samsung_galaxy_s4 HOST_BROWSER=chrome <%= mobile %>
|
1080
1113
|
samsung_galaxy_s5: WEB_BROWSER=samsung_galaxy_s5 HOST_BROWSER=chrome <%= mobile %>
|
1081
1114
|
samsung_galaxy_s6: WEB_BROWSER=samsung_galaxy_s6 HOST_BROWSER=chrome <%= mobile %>
|
@@ -1158,7 +1191,7 @@ service(s) that you intend to connect with.
|
|
1158
1191
|
# profiles for remotely hosted web browsers on the BrowserStack service
|
1159
1192
|
#==============
|
1160
1193
|
|
1161
|
-
browserstack: WEB_BROWSER=browserstack BS_USERNAME
|
1194
|
+
browserstack: WEB_BROWSER=browserstack BS_USERNAME="<INSERT USER NAME HERE>" BS_AUTHKEY="<INSERT PASSWORD HERE>"
|
1162
1195
|
bs_desktop: --profile browserstack <%= desktop %> RESOLUTION="1920x1080"
|
1163
1196
|
bs_mobile: --profile browserstack <%= mobile %>
|
1164
1197
|
|
@@ -1183,26 +1216,14 @@ service(s) that you intend to connect with.
|
|
1183
1216
|
bs_chrome_yos: --profile bs_osx_yosemite BS_BROWSER="Chrome"
|
1184
1217
|
bs_safari_yos: --profile bs_osx_yosemite BS_BROWSER="Safari"
|
1185
1218
|
|
1186
|
-
bs_osx_mavericks: --profile bs_desktop BS_OS="OS X" BS_OS_VERSION="Mavericks"
|
1187
|
-
bs_ff_mav: --profile bs_osx_mavericks BS_BROWSER="Firefox"
|
1188
|
-
bs_chrome_mav: --profile bs_osx_mavericks BS_BROWSER="Chrome"
|
1189
|
-
bs_safari_mav: --profile bs_osx_mavericks BS_BROWSER="Safari"
|
1190
|
-
|
1191
1219
|
# BrowserStack Windows desktop browser profiles
|
1192
|
-
bs_win7: --profile bs_desktop BS_OS="Windows" BS_OS_VERSION="7"
|
1193
1220
|
bs_win8: --profile bs_desktop BS_OS="Windows" BS_OS_VERSION="8"
|
1194
1221
|
bs_win10: --profile bs_desktop BS_OS="Windows" BS_OS_VERSION="10"
|
1195
|
-
bs_ff_win7: --profile bs_win7 BS_BROWSER="Firefox"
|
1196
1222
|
bs_ff_win8: --profile bs_win8 BS_BROWSER="Firefox"
|
1197
1223
|
bs_ff_win10: --profile bs_win10 BS_BROWSER="Firefox"
|
1198
|
-
bs_chrome_win7: --profile bs_win7 BS_BROWSER="Chrome"
|
1199
1224
|
bs_chrome_win8: --profile bs_win8 BS_BROWSER="Chrome"
|
1200
1225
|
bs_chrome_win10: --profile bs_win10 BS_BROWSER="Chrome"
|
1201
1226
|
|
1202
|
-
bs_ie_win7: --profile bs_win7 BS_BROWSER="IE"
|
1203
|
-
bs_ie11_win7: --profile bs_ie_win7 BS_VERSION="11.0"
|
1204
|
-
bs_ie10_win7: --profile bs_ie_win7 BS_VERSION="10.0"
|
1205
|
-
bs_ie9_win7: --profile bs_ie_win7 BS_VERSION="9.0"
|
1206
1227
|
bs_ie10_win8: --profile bs_win8 BS_BROWSER="IE" BS_VERSION="10.0"
|
1207
1228
|
bs_ie11_win8: --profile bs_desktop BS_OS="Windows" BS_OS_VERSION="8.1" BS_BROWSER="IE" BS_VERSION="11.0"
|
1208
1229
|
bs_ie11_win10: --profile bs_win10 BS_BROWSER="IE" BS_VERSION="11.0"
|
@@ -1265,7 +1286,7 @@ service(s) that you intend to connect with.
|
|
1265
1286
|
# profiles for remotely hosted web browsers on the CrossBrowserTesting service
|
1266
1287
|
#==============
|
1267
1288
|
|
1268
|
-
crossbrowser: WEB_BROWSER=crossbrowser CB_USERNAME
|
1289
|
+
crossbrowser: WEB_BROWSER=crossbrowser CB_USERNAME="<INSERT USER NAME HERE>" CB_AUTHKEY="<INSERT PASSWORD HERE>"
|
1269
1290
|
cb_desktop: --profile crossbrowser <%= desktop %>
|
1270
1291
|
cb_mobile: --profile crossbrowser <%= mobile %>
|
1271
1292
|
|
@@ -1285,27 +1306,16 @@ service(s) that you intend to connect with.
|
|
1285
1306
|
cb_chrome_yos: --profile cb_osx_yosemite CB_BROWSER="Chrome48x64"
|
1286
1307
|
cb_safari_yos: --profile cb_osx_yosemite CB_BROWSER="Safari8"
|
1287
1308
|
|
1288
|
-
cb_osx_mavericks: --profile cb_osx CB_OS="Mac10.9"
|
1289
|
-
cb_ff_mav: --profile cb_osx_mavericks CB_BROWSER="FF46"
|
1290
|
-
cb_chrome_mav: --profile cb_osx_mavericks CB_BROWSER="Chrome48x64"
|
1291
|
-
cb_safari_mav: --profile cb_osx_mavericks CB_BROWSER="Safari7"
|
1292
|
-
|
1293
1309
|
# CrossBrowserTesting Windows desktop browser profiles
|
1294
1310
|
cb_win: --profile cb_desktop RESOLUTION="1920x1080"
|
1295
|
-
cb_win7: --profile cb_win CB_OS="Win7x64-C1"
|
1296
1311
|
cb_win8: --profile cb_win CB_OS="Win8"
|
1297
1312
|
cb_win10: --profile cb_win CB_OS="Win10"
|
1298
|
-
cb_ff_win7: --profile cb_win7 CB_BROWSER="FF46"
|
1299
1313
|
cb_ff_win8: --profile cb_win8 CB_BROWSER="FF46"
|
1300
1314
|
cb_ff_win10: --profile cb_win10 CB_BROWSER="FF46"
|
1301
|
-
cb_chrome_win7: --profile cb_win7 CB_BROWSER="Chrome48x64"
|
1302
1315
|
cb_chrome_win8: --profile cb_win8 CB_BROWSER="Chrome48x64"
|
1303
1316
|
cb_chrome_win10: --profile cb_win10 CB_BROWSER="Chrome48x64"
|
1304
1317
|
cb_edge_win10: --profile cb_win10 CB_BROWSER="Edge20"
|
1305
1318
|
|
1306
|
-
cb_ie11_win7: --profile cb_win7 CB_BROWSER="IE11"
|
1307
|
-
cb_ie10_win7: --profile cb_win7 CB_BROWSER="IE10"
|
1308
|
-
cb_ie9_win7: --profile cb_win7 CB_BROWSER="IE9"
|
1309
1319
|
cb_ie11_win8: --profile cb_win8 CB_BROWSER="IE11"
|
1310
1320
|
cb_ie10_win8: --profile cb_win8 CB_BROWSER="IE10"
|
1311
1321
|
cb_ie11_win10: --profile cb_win10 CB_BROWSER="IE11"
|
@@ -1332,7 +1342,7 @@ service(s) that you intend to connect with.
|
|
1332
1342
|
# profiles for remotely hosted web browsers on the SauceLabs service
|
1333
1343
|
#==============
|
1334
1344
|
|
1335
|
-
saucelabs: WEB_BROWSER=saucelabs SL_USERNAME
|
1345
|
+
saucelabs: WEB_BROWSER=saucelabs SL_USERNAME="<INSERT USER NAME HERE>" SL_AUTHKEY="<INSERT PASSWORD HERE>"
|
1336
1346
|
sl_desktop: --profile saucelabs <%= desktop %>
|
1337
1347
|
|
1338
1348
|
# SauceLabs OS X desktop browser profiles
|
@@ -1351,25 +1361,14 @@ service(s) that you intend to connect with.
|
|
1351
1361
|
sl_chrome_yos: --profile sl_osx_yosemite SL_BROWSER="chrome"
|
1352
1362
|
sl_safari_yos: --profile sl_osx_yosemite SL_BROWSER="safari"
|
1353
1363
|
|
1354
|
-
sl_osx_mavericks: --profile sl_desktop SL_OS="OS X 10.9" RESOLUTION="1920x1200"
|
1355
|
-
sl_ff_mav: --profile sl_osx_mavericks SL_BROWSER="firefox"
|
1356
|
-
sl_chrome_mav: --profile sl_osx_mavericks SL_BROWSER="chrome"
|
1357
|
-
sl_safari_mav: --profile sl_osx_mavericks SL_BROWSER="safari"
|
1358
|
-
|
1359
1364
|
# SauceLabs Windows desktop browser profiles
|
1360
|
-
sl_win7: --profile sl_desktop SL_OS="Windows 7" RESOLUTION="1920x1200"
|
1361
1365
|
sl_win8: --profile sl_desktop SL_OS="Windows 8.1" RESOLUTION="1280x1024"
|
1362
1366
|
sl_win10: --profile sl_desktop SL_OS="Windows 10" RESOLUTION="1280x1024"
|
1363
|
-
sl_ff_win7: --profile sl_win7 SL_BROWSER="firefox"
|
1364
1367
|
sl_ff_win8: --profile sl_win8 SL_BROWSER="firefox"
|
1365
1368
|
sl_ff_win10: --profile sl_win10 SL_BROWSER="firefox"
|
1366
|
-
sl_chrome_win7: --profile sl_win7 SL_BROWSER="chrome"
|
1367
1369
|
sl_chrome_win8: --profile sl_win8 SL_BROWSER="chrome"
|
1368
1370
|
sl_chrome_win10: --profile sl_win10 SL_BROWSER="chrome"
|
1369
1371
|
|
1370
|
-
sl_ie11_win7: --profile sl_win7 SL_BROWSER="internet explorer" SL_VERSION="11.0"
|
1371
|
-
sl_ie10_win7: --profile sl_win7 SL_BROWSER="internet explorer" SL_VERSION="10.0"
|
1372
|
-
sl_ie9_win7: --profile sl_win7 SL_BROWSER="internet explorer" SL_VERSION="9.0"
|
1373
1372
|
sl_ie11_win8: --profile sl_win8 SL_BROWSER="internet explorer" SL_VERSION="11.0"
|
1374
1373
|
sl_ie11_win10: --profile sl_win10 SL_BROWSER="internet explorer"
|
1375
1374
|
|
@@ -1378,7 +1377,7 @@ service(s) that you intend to connect with.
|
|
1378
1377
|
# profiles for remotely hosted web browsers on the TestingBot service
|
1379
1378
|
#==============
|
1380
1379
|
|
1381
|
-
testingbot: WEB_BROWSER=testingbot TB_USERNAME
|
1380
|
+
testingbot: WEB_BROWSER=testingbot TB_USERNAME="<INSERT USER NAME HERE>" TB_AUTHKEY="<INSERT PASSWORD HERE>"
|
1382
1381
|
tb_desktop: --profile testingbot <%= desktop %> RESOLUTION="1920x1200"
|
1383
1382
|
tb_mobile: --profile testingbot <%= mobile %>
|
1384
1383
|
|
@@ -1398,23 +1397,14 @@ service(s) that you intend to connect with.
|
|
1398
1397
|
tb_chrome_yos: --profile tb_osx_yosemite TB_BROWSER="chrome"
|
1399
1398
|
tb_safari_yos: --profile tb_osx_yosemite TB_BROWSER="safari" TB_VERSION="8"
|
1400
1399
|
|
1401
|
-
tb_osx_mavericks: --profile tb_desktop TB_OS="MAVERICKS"
|
1402
|
-
tb_ff_mav: --profile tb_osx_mavericks TB_BROWSER="firefox"
|
1403
|
-
tb_chrome_mav: --profile tb_osx_mavericks TB_BROWSER="chrome"
|
1404
|
-
tb_safari_mav: --profile tb_osx_mavericks TB_BROWSER="safari" TB_VERSION="7"
|
1405
|
-
|
1406
1400
|
# TestingBot Windows desktop browser profiles
|
1407
|
-
tb_win7: --profile tb_desktop TB_OS="WIN7"
|
1408
1401
|
tb_win8: --profile tb_desktop TB_OS="WIN8"
|
1409
1402
|
tb_win10: --profile tb_desktop TB_OS="WIN10"
|
1410
|
-
tb_ff_win7: --profile tb_win7 TB_BROWSER="firefox"
|
1411
1403
|
tb_ff_win8: --profile tb_win8 TB_BROWSER="firefox"
|
1412
1404
|
tb_ff_win10: --profile tb_win10 TB_BROWSER="firefox"
|
1413
|
-
tb_chrome_win7: --profile tb_win7 TB_BROWSER="chrome"
|
1414
1405
|
tb_chrome_win8: --profile tb_win8 TB_BROWSER="chrome"
|
1415
1406
|
tb_chrome_win10: --profile tb_win10 TB_BROWSER="chrome"
|
1416
1407
|
|
1417
|
-
tb_ie9_win7: --profile tb_win7 TB_BROWSER="internet explorer" TB_VERSION="9"
|
1418
1408
|
tb_ie11_win8: --profile tb_win8 TB_BROWSER="internet explorer" TB_VERSION="11"
|
1419
1409
|
tb_ie10_win8: --profile tb_win8 TB_BROWSER="internet explorer" TB_VERSION="10"
|
1420
1410
|
tb_ie11_win10: --profile tb_win10 TB_BROWSER="internet explorer" TB_VERSION="11"
|
@@ -1435,7 +1425,6 @@ service(s) that you intend to connect with.
|
|
1435
1425
|
tb_ipad_air2_10: --profile tb_ios DEVICE_TYPE=tablet TB_VERSION="10.0" TB_DEVICE="iPad Air 2"
|
1436
1426
|
tb_ipad_air2_93: --profile tb_ios DEVICE_TYPE=tablet TB_VERSION="9.3" TB_DEVICE="iPad Air 2"
|
1437
1427
|
|
1438
|
-
|
1439
1428
|
# TestingBot Android mobile browser profiles
|
1440
1429
|
tb_android: --profile tb_mobile TB_OS="ANDROID" TB_BROWSER="browser" TB_PLATFORM="Android"
|
1441
1430
|
tb_nexus_s: --profile tb_android TB_VERSION="6.0" TB_DEVICE="Nexus S"
|
@@ -1447,6 +1436,31 @@ service(s) that you intend to connect with.
|
|
1447
1436
|
tb_galaxy_s6: --profile tb_android TB_VERSION="6.0" TB_DEVICE="Galaxy S6"
|
1448
1437
|
|
1449
1438
|
|
1439
|
+
#==============
|
1440
|
+
# profiles for remotely hosted web browsers on the Gridlastic service
|
1441
|
+
#==============
|
1442
|
+
|
1443
|
+
gridlastic: WEB_BROWSER=gridlastic GL_USERNAME="<INSERT USER NAME HERE>" GL_AUTHKEY="<INSERT PASSWORD HERE>" GL_SUBDOMAIN="<INSERT SUBDOMAIN HERE>"
|
1444
|
+
gl_video: RECORD_VIDEO="True" VIDEO_URL="<INSERT VIDEO URL HERE>"
|
1445
|
+
gl_desktop: --profile gridlastic --profile gl_video <%= desktop %>
|
1446
|
+
|
1447
|
+
# Gridlastic Windows desktop browser profiles
|
1448
|
+
gl_windows: --profile gl_desktop GL_PLATFORM="windows"
|
1449
|
+
gl_win8: --profile gl_windows GL_OS="WIN8"
|
1450
|
+
gl_win8_1: --profile gl_windows GL_OS="WIN8_1"
|
1451
|
+
gl_win10: --profile gl_windows GL_OS="WIN10"
|
1452
|
+
gl_ff_win8: --profile gl_win8_1 GL_BROWSER="firefox" GL_VERSION="59"
|
1453
|
+
gl_ff_win10: --profile gl_win10 GL_BROWSER="firefox" GL_VERSION="59"
|
1454
|
+
gl_chrome_win8: --profile gl_win8_1 GL_BROWSER="chrome" GL_VERSION="latest"
|
1455
|
+
gl_chrome_win10: --profile gl_win10 GL_BROWSER="chrome" GL_VERSION="latest"
|
1456
|
+
|
1457
|
+
gl_ie11_win8: --profile gl_win8_1 GL_BROWSER="internet explorer" GL_VERSION="11"
|
1458
|
+
gl_ie10_win8: --profile gl_win8 GL_BROWSER="internet explorer" GL_VERSION="10"
|
1459
|
+
gl_ie11_win10: --profile gl_win10 GL_BROWSER="internet explorer" GL_VERSION="11"
|
1460
|
+
|
1461
|
+
gl_chrome_linux: --profile gl_desktop GL_OS="LINUX" GL_BROWSER="chrome" GL_VERSION="latest"
|
1462
|
+
|
1463
|
+
|
1450
1464
|
To specify a locally hosted target browser using a profile at runtime, you use the flag `--profile` or `-p` followed by the profile name when
|
1451
1465
|
invoking Cucumber in the command line. For instance, the following command invokes Cucumber and specifies that a local instance of Chrome
|
1452
1466
|
will be used as the target web browser:
|
data/lib/devices/devices.yml
CHANGED
@@ -61,7 +61,7 @@
|
|
61
61
|
:css_width: 375
|
62
62
|
:css_height: 667
|
63
63
|
:default_orientation: portrait
|
64
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
64
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) CriOS/67.0.3396.69 Mobile/15F79 Safari/604.1"
|
65
65
|
:iphone7_firefox:
|
66
66
|
:name: "iPhone 7 - Firefox"
|
67
67
|
:os: ios
|
@@ -69,7 +69,7 @@
|
|
69
69
|
:css_width: 375
|
70
70
|
:css_height: 667
|
71
71
|
:default_orientation: portrait
|
72
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
72
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/12.0b10862 Mobile/15F79 Safari/605.1.15"
|
73
73
|
:iphone7_edge:
|
74
74
|
:name: "iPhone 7 - MS Edge"
|
75
75
|
:os: ios
|
@@ -77,7 +77,7 @@
|
|
77
77
|
:css_width: 375
|
78
78
|
:css_height: 667
|
79
79
|
:default_orientation: portrait
|
80
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
80
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 EdgiOS/42.1.1.0 Mobile/15F79 Safari/605.1.15"
|
81
81
|
:iphone8:
|
82
82
|
:name: "iPhone 8"
|
83
83
|
:os: ios
|
@@ -237,7 +237,7 @@ nexus6:
|
|
237
237
|
:css_width: 1024
|
238
238
|
:css_height: 768
|
239
239
|
:default_orientation: landscape
|
240
|
-
:user_agent: "Mozilla/5.0 (iPad; CPU OS
|
240
|
+
:user_agent: "Mozilla/5.0 (iPad; CPU OS 11_4 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) CriOS/67.0.3396.69 Mobile/15F79 Safari/604.1"
|
241
241
|
:ipad_firefox:
|
242
242
|
:name: "iPad - Firefox"
|
243
243
|
:os: ios
|
@@ -245,7 +245,7 @@ nexus6:
|
|
245
245
|
:css_width: 1024
|
246
246
|
:css_height: 768
|
247
247
|
:default_orientation: landscape
|
248
|
-
:user_agent: "Mozilla/5.0 (iPad; CPU OS
|
248
|
+
:user_agent: "Mozilla/5.0 (iPad; CPU OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/12.0b10862 Mobile/15F79 Safari/605.1.15"
|
249
249
|
:ipad_edge:
|
250
250
|
:name: "iPad - MS Edge"
|
251
251
|
:os: ios
|
@@ -253,7 +253,7 @@ nexus6:
|
|
253
253
|
:css_width: 1024
|
254
254
|
:css_height: 768
|
255
255
|
:default_orientation: landscape
|
256
|
-
:user_agent: "Mozilla/5.0 (iPad; CPU OS
|
256
|
+
:user_agent: "Mozilla/5.0 (iPad; CPU OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 EdgiOS/42.1.1.0 Mobile/15F79 Safari/605.1.15"
|
257
257
|
:android_tablet:
|
258
258
|
:name: "Generic Android tablet"
|
259
259
|
:os: android
|
@@ -32,6 +32,9 @@ module TestCentricity
|
|
32
32
|
when :crossbrowser
|
33
33
|
initialize_crossbrowser
|
34
34
|
context = 'CrossBrowserTesting cloud service'
|
35
|
+
when :gridlastic
|
36
|
+
initialize_gridlastic
|
37
|
+
context = 'Gridlastic cloud service'
|
35
38
|
when :saucelabs
|
36
39
|
initialize_saucelabs
|
37
40
|
context = 'Sauce Labs cloud service'
|
@@ -44,7 +47,7 @@ module TestCentricity
|
|
44
47
|
context = 'Selenium Grid2'
|
45
48
|
else
|
46
49
|
initialize_local_browser
|
47
|
-
context = 'local instance'
|
50
|
+
context = 'local browser instance'
|
48
51
|
end
|
49
52
|
end
|
50
53
|
|
@@ -239,10 +242,12 @@ module TestCentricity
|
|
239
242
|
Environ.device_name = Browsers.mobile_device_name(ENV['WEB_BROWSER'])
|
240
243
|
end
|
241
244
|
|
242
|
-
Capybara.default_driver = :selenium
|
243
245
|
Capybara.register_driver :selenium do |app|
|
244
246
|
case browser
|
245
|
-
when :
|
247
|
+
when :safari
|
248
|
+
desired_caps = Selenium::WebDriver::Remote::Capabilities.safari(cleanSession: true)
|
249
|
+
Capybara::Selenium::Driver.new(app, browser: browser, desired_capabilities: desired_caps)
|
250
|
+
when :ie, :edge
|
246
251
|
Capybara::Selenium::Driver.new(app, browser: browser)
|
247
252
|
when :firefox_legacy
|
248
253
|
Capybara::Selenium::Driver.new(app, browser: :firefox, marionette: false)
|
@@ -290,6 +295,7 @@ module TestCentricity
|
|
290
295
|
end
|
291
296
|
end
|
292
297
|
end
|
298
|
+
Capybara.default_driver = :selenium
|
293
299
|
end
|
294
300
|
|
295
301
|
def self.initialize_browserstack
|
@@ -329,6 +335,8 @@ module TestCentricity
|
|
329
335
|
capabilities['resolution'] = ENV['RESOLUTION'] if ENV['RESOLUTION']
|
330
336
|
end
|
331
337
|
|
338
|
+
capabilities['browserstack.selenium_version'] = ENV['SELENIUM_VERSION'] if ENV['SELENIUM_VERSION']
|
339
|
+
capabilities['browserstack.console'] = ENV['CONSOLE_LOGS'] if ENV['CONSOLE_LOGS']
|
332
340
|
capabilities['browserstack.timezone'] = ENV['TIME_ZONE'] if ENV['TIME_ZONE']
|
333
341
|
capabilities['browserstack.video'] = ENV['RECORD_VIDEO'] if ENV['RECORD_VIDEO']
|
334
342
|
capabilities['browserstack.debug'] = 'true'
|
@@ -354,8 +362,12 @@ module TestCentricity
|
|
354
362
|
capabilities['ie.ensureCleanSession'] = 'true'
|
355
363
|
capabilities['ie.browserCommandLineSwitches'] = 'true'
|
356
364
|
capabilities['nativeEvents'] = 'true'
|
365
|
+
capabilities['browserstack.ie.driver'] = ENV['WD_VERSION'] if ENV['WD_VERSION']
|
366
|
+
when :firefox
|
367
|
+
capabilities['browserstack.geckodriver'] = ENV['WD_VERSION'] if ENV['WD_VERSION']
|
357
368
|
when :safari
|
358
369
|
capabilities['cleanSession'] = 'true'
|
370
|
+
capabilities['browserstack.safari.driver'] = ENV['WD_VERSION'] if ENV['WD_VERSION']
|
359
371
|
when :iphone, :ipad
|
360
372
|
capabilities['javascriptEnabled'] = 'true'
|
361
373
|
capabilities['cleanSession'] = 'true'
|
@@ -418,6 +430,33 @@ module TestCentricity
|
|
418
430
|
Capybara.run_server = false
|
419
431
|
end
|
420
432
|
|
433
|
+
def self.initialize_gridlastic
|
434
|
+
browser = ENV['GL_BROWSER']
|
435
|
+
Environ.os = ENV['GL_OS']
|
436
|
+
endpoint = "http://#{ENV['GL_USERNAME']}:#{ENV['GL_AUTHKEY']}@#{ENV['GL_SUBDOMAIN']}.gridlastic.com:80/wd/hub"
|
437
|
+
|
438
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.new
|
439
|
+
capabilities['browserName'] = browser
|
440
|
+
capabilities['version'] = ENV['GL_VERSION'] if ENV['GL_VERSION']
|
441
|
+
capabilities['platform'] = ENV['GL_OS']
|
442
|
+
capabilities['platformName'] = ENV['GL_PLATFORM']
|
443
|
+
capabilities['video'] = ENV['RECORD_VIDEO'].capitalize if ENV['RECORD_VIDEO']
|
444
|
+
|
445
|
+
Capybara.register_driver :selenium do |app|
|
446
|
+
client = Selenium::WebDriver::Remote::Http::Default.new
|
447
|
+
client.timeout = 1200
|
448
|
+
Capybara::Selenium::Driver.new(app, http_client: client, browser: :remote, url: endpoint, desired_capabilities: capabilities)
|
449
|
+
end
|
450
|
+
|
451
|
+
Capybara.default_driver = :selenium
|
452
|
+
Capybara.run_server = false
|
453
|
+
|
454
|
+
if ENV['RECORD_VIDEO']
|
455
|
+
session_id = Capybara.current_session.driver.browser.instance_variable_get(:@bridge).session_id
|
456
|
+
puts "TEST VIDEO URL: #{ENV['VIDEO_URL']}#{session_id}"
|
457
|
+
end
|
458
|
+
end
|
459
|
+
|
421
460
|
def self.initialize_remote
|
422
461
|
browser = ENV['WEB_BROWSER']
|
423
462
|
endpoint = ENV['REMOTE_ENDPOINT'] || 'http://127.0.0.1:4444/wd/hub'
|
@@ -472,16 +511,14 @@ module TestCentricity
|
|
472
511
|
|
473
512
|
Environ.os = ENV['TB_OS']
|
474
513
|
if ENV['TB_PLATFORM']
|
475
|
-
if ENV['ORIENTATION']
|
476
|
-
Environ.device_orientation = ENV['ORIENTATION']
|
477
|
-
end
|
514
|
+
Environ.device_orientation = ENV['ORIENTATION'] if ENV['ORIENTATION']
|
478
515
|
Environ.device_os = ENV['TB_PLATFORM']
|
479
516
|
Environ.device_name = ENV['TB_DEVICE']
|
480
517
|
Environ.device = :device
|
481
518
|
Environ.platform = :mobile
|
482
519
|
Environ.device_type = ENV['DEVICE_TYPE'] if ENV['DEVICE_TYPE']
|
483
520
|
else
|
484
|
-
Environ.platform
|
521
|
+
Environ.platform = :desktop
|
485
522
|
end
|
486
523
|
|
487
524
|
ENV['TUNNELING'] ?
|
@@ -498,11 +535,9 @@ module TestCentricity
|
|
498
535
|
capabilities['platform'] = ENV['TB_OS']
|
499
536
|
capabilities['record_video'] = ENV['RECORD_VIDEO'] if ENV['RECORD_VIDEO']
|
500
537
|
if ENV['TB_PLATFORM']
|
501
|
-
if ENV['ORIENTATION']
|
502
|
-
capabilities['orientation'] = ENV['ORIENTATION']
|
503
|
-
end
|
538
|
+
capabilities['orientation'] = ENV['ORIENTATION'] if ENV['ORIENTATION']
|
504
539
|
capabilities['platformName'] = ENV['TB_PLATFORM']
|
505
|
-
capabilities['deviceName']
|
540
|
+
capabilities['deviceName'] = ENV['TB_DEVICE']
|
506
541
|
end
|
507
542
|
|
508
543
|
Capybara::Selenium::Driver.new(app, browser: :remote, url: endpoint, desired_capabilities: capabilities)
|
@@ -512,7 +547,6 @@ module TestCentricity
|
|
512
547
|
|
513
548
|
Capybara.default_driver = :testingbot
|
514
549
|
Capybara.run_server = false
|
515
|
-
|
516
550
|
end
|
517
551
|
end
|
518
552
|
end
|
@@ -52,7 +52,7 @@ module TestCentricity
|
|
52
52
|
page.find(:css, @list_trigger).click
|
53
53
|
sleep(1)
|
54
54
|
end
|
55
|
-
if first(:css, @list_item,
|
55
|
+
if first(:css, @list_item, minimum: 0)
|
56
56
|
if option.is_a?(Array)
|
57
57
|
option.each do |item|
|
58
58
|
page.find(:css, @list_item, text: item.strip).click
|
@@ -89,7 +89,7 @@ module TestCentricity
|
|
89
89
|
def get_options
|
90
90
|
obj, = find_element
|
91
91
|
object_not_found_exception(obj, nil)
|
92
|
-
if first(:css, @list_item,
|
92
|
+
if first(:css, @list_item, minimum: 0)
|
93
93
|
obj.all(@list_item).collect(&:text)
|
94
94
|
else
|
95
95
|
obj.all('option').collect(&:text)
|
@@ -108,7 +108,7 @@ module TestCentricity
|
|
108
108
|
def get_option_count
|
109
109
|
obj, = find_element
|
110
110
|
object_not_found_exception(obj, nil)
|
111
|
-
if first(:css, @list_item,
|
111
|
+
if first(:css, @list_item, minimum: 0)
|
112
112
|
obj.all(@list_item).count
|
113
113
|
else
|
114
114
|
obj.all('option').count
|
@@ -134,7 +134,7 @@ module TestCentricity
|
|
134
134
|
def get_selected_option
|
135
135
|
obj, = find_element
|
136
136
|
object_not_found_exception(obj, nil)
|
137
|
-
if first(:css, @list_item,
|
137
|
+
if first(:css, @list_item, minimum: 0)
|
138
138
|
obj.first(:css, @selected_item).text
|
139
139
|
else
|
140
140
|
obj.first('option[selected]').text
|
@@ -198,7 +198,15 @@ module TestCentricity
|
|
198
198
|
def select_item(obj, option)
|
199
199
|
if option.is_a?(Hash)
|
200
200
|
obj.find("option[value='#{option[:value]}']").click if option.has_key?(:value)
|
201
|
-
|
201
|
+
|
202
|
+
if option.has_key?(:index)
|
203
|
+
if @locator_type == :xpath
|
204
|
+
obj.find(:xpath, "option[#{option[:index]}]").select_option
|
205
|
+
else
|
206
|
+
obj.find(:css, "option:nth-child(#{option[:index]})").select_option
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
202
210
|
obj.select option[:text] if option.has_key?(:text)
|
203
211
|
else
|
204
212
|
obj.select option
|
data/testcentricity_web.gemspec
CHANGED
@@ -12,13 +12,13 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.email = ['testcentricity@gmail.com']
|
13
13
|
spec.summary = %q{A Page Object and Data Object Model Framework for desktop and mobile web testing}
|
14
14
|
spec.description = %q{
|
15
|
-
The TestCentricity™ Web core generic framework for desktop and mobile web
|
16
|
-
for use with Cucumber, Capybara, and Selenium-Webdriver. The
|
17
|
-
against locally hosted desktop browsers
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
The TestCentricity™ Web core generic framework for desktop and mobile web browser-based applications testing implements
|
16
|
+
a Page Object Model DSL for use with Cucumber, Capybara, and Selenium-Webdriver. The gem provides support for running
|
17
|
+
automated tests against locally hosted desktop browsers, locally hosted emulated mobile browsers (iOS, Android, Windows
|
18
|
+
Phone, Blackberry, Kindle Fire) running within a locally hosted instance of Chrome, mobile Safari browsers on iOS device
|
19
|
+
simulators or physical iOS devices (using Appium and XCode on OS X), mobile Chrome or Android browsers on Android Studio
|
20
|
+
virtual device emulators (using Appium and Android Studio on OS X), or cloud hosted desktop or mobile web browsers (using
|
21
|
+
the BrowserStack, Sauce Labs, CrossBrowserTesting, TestingBot, or Gridlastic services).}
|
22
22
|
spec.homepage = ''
|
23
23
|
spec.license = 'BSD3'
|
24
24
|
|
@@ -31,16 +31,16 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_development_dependency 'bundler', '~> 1.5'
|
32
32
|
spec.add_development_dependency 'rake'
|
33
33
|
|
34
|
-
spec.
|
35
|
-
spec.
|
36
|
-
spec.
|
37
|
-
spec.
|
38
|
-
spec.
|
39
|
-
spec.
|
40
|
-
spec.
|
41
|
-
spec.
|
42
|
-
spec.
|
43
|
-
spec.
|
34
|
+
spec.add_runtime_dependency 'capybara'
|
35
|
+
spec.add_runtime_dependency 'test-unit'
|
36
|
+
spec.add_runtime_dependency 'selenium-webdriver', ['>= 3.11.0', '< 4.0']
|
37
|
+
spec.add_runtime_dependency 'faker'
|
38
|
+
spec.add_runtime_dependency 'chronic', '0.10.2'
|
39
|
+
spec.add_runtime_dependency 'spreadsheet', '1.1.1'
|
40
|
+
spec.add_runtime_dependency 'os'
|
41
|
+
spec.add_runtime_dependency 'i18n'
|
42
|
+
spec.add_runtime_dependency 'browserstack-local'
|
43
|
+
spec.add_runtime_dependency 'appium_lib'
|
44
44
|
|
45
45
|
spec.add_runtime_dependency 'childprocess', '~> 0.5'
|
46
46
|
end
|
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: 3.0.
|
4
|
+
version: 3.0.6
|
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-
|
11
|
+
date: 2018-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -73,6 +73,9 @@ dependencies:
|
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 3.11.0
|
76
|
+
- - "<"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '4.0'
|
76
79
|
type: :runtime
|
77
80
|
prerelease: false
|
78
81
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -80,6 +83,9 @@ dependencies:
|
|
80
83
|
- - ">="
|
81
84
|
- !ruby/object:Gem::Version
|
82
85
|
version: 3.11.0
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '4.0'
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: faker
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,13 +200,13 @@ dependencies:
|
|
194
200
|
version: '0.5'
|
195
201
|
description: |2-
|
196
202
|
|
197
|
-
The TestCentricity™ Web core generic framework for desktop and mobile web
|
198
|
-
for use with Cucumber, Capybara, and Selenium-Webdriver. The
|
199
|
-
against locally hosted desktop browsers
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
203
|
+
The TestCentricity™ Web core generic framework for desktop and mobile web browser-based applications testing implements
|
204
|
+
a Page Object Model DSL for use with Cucumber, Capybara, and Selenium-Webdriver. The gem provides support for running
|
205
|
+
automated tests against locally hosted desktop browsers, locally hosted emulated mobile browsers (iOS, Android, Windows
|
206
|
+
Phone, Blackberry, Kindle Fire) running within a locally hosted instance of Chrome, mobile Safari browsers on iOS device
|
207
|
+
simulators or physical iOS devices (using Appium and XCode on OS X), mobile Chrome or Android browsers on Android Studio
|
208
|
+
virtual device emulators (using Appium and Android Studio on OS X), or cloud hosted desktop or mobile web browsers (using
|
209
|
+
the BrowserStack, Sauce Labs, CrossBrowserTesting, TestingBot, or Gridlastic services).
|
204
210
|
email:
|
205
211
|
- testcentricity@gmail.com
|
206
212
|
executables: []
|