testcentricity_web 3.0.18 → 3.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -1
- data/Gemfile.lock +6 -6
- data/README.md +68 -45
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/webdriver_helper.rb +29 -13
- data/lib/testcentricity_web/web_elements/audio.rb +4 -4
- data/lib/testcentricity_web/web_elements/video.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf1335ebc9f0b1426d23e0c573f29b31e7a7c12e
|
4
|
+
data.tar.gz: c9dcf1a6a08879190a3d2b0f3f96ba1ba698babb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a967c9fc28595c9a5c96c435571135d68cb8c62acf5212d4a85fd20c1aaec58025739c33638611a5a2866b9f597ae2a8730ca065b4feb01246ad7c9fa859381
|
7
|
+
data.tar.gz: 732545c7faae21186e6edb8c538a9d9329b5d5b7575c6663936cde59903c7522b46d78fea31effab58d99d8695e651df1c5b31bd281bc30389d29c41f6aa4ecd
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
|
5
|
+
## [3.0.19] - 2018-10-10
|
6
|
+
|
7
|
+
### Added
|
8
|
+
* Added support for testing file downloads with locally hosted instances of Chrome or Firefox desktop browsers.
|
9
|
+
|
10
|
+
### Changed
|
11
|
+
* `Audio.current_time`, `Audio.duration`, `Video.current_time`, and `Video.duration` methods now return a `Float`.
|
12
|
+
|
13
|
+
### Removed
|
14
|
+
* Removed support for legacy Firefox version 47.0.1.
|
15
|
+
* Removed deprecated `TestCentricity::WebDriverConnect.set_webdriver_path` method.
|
16
|
+
|
17
|
+
|
4
18
|
## [3.0.18] - 2018-10-02
|
5
19
|
|
6
20
|
### Added
|
@@ -15,12 +29,14 @@ All notable changes to this project will be documented in this file.
|
|
15
29
|
### Removed
|
16
30
|
* Removed `iPhone`, `iPhone4`, and `iPhone5` device profiles.
|
17
31
|
|
32
|
+
|
18
33
|
## [3.0.17] - 2018-10-01
|
19
34
|
|
20
35
|
### Added
|
21
36
|
* `UIElement.aria_disabled?` and `UIElement.aria_label` methods.
|
22
37
|
* Updated `PageObject.verify_ui_states` and `PageSection.verify_ui_states` methods to support verification of `aria-label` and `aria-disabled` properties.
|
23
38
|
|
39
|
+
|
24
40
|
## [3.0.16] - 2018-09-21
|
25
41
|
|
26
42
|
### Added
|
@@ -38,7 +54,7 @@ All notable changes to this project will be documented in this file.
|
|
38
54
|
## [3.0.14] - 2018-09-17
|
39
55
|
|
40
56
|
### Added
|
41
|
-
* Added support for
|
57
|
+
* Added support for testing file uploads in browsers running on remote cloud hosted services as well as in Selenium Grid and Dockerized Selenium
|
42
58
|
Grid environments.
|
43
59
|
|
44
60
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
testcentricity_web (3.0.
|
4
|
+
testcentricity_web (3.0.18.1)
|
5
5
|
appium_lib
|
6
6
|
browserstack-local
|
7
7
|
capybara (>= 3.1, < 4)
|
@@ -24,11 +24,11 @@ GEM
|
|
24
24
|
appium_lib_core (~> 2.0.0)
|
25
25
|
nokogiri (~> 1.8, >= 1.8.1)
|
26
26
|
tomlrb (~> 1.1)
|
27
|
-
appium_lib_core (2.0.
|
27
|
+
appium_lib_core (2.0.2)
|
28
28
|
faye-websocket (~> 0.10.0)
|
29
29
|
selenium-webdriver (~> 3.14)
|
30
30
|
browserstack-local (1.3.0)
|
31
|
-
capybara (3.
|
31
|
+
capybara (3.9.0)
|
32
32
|
addressable
|
33
33
|
mini_mime (>= 0.1.3)
|
34
34
|
nokogiri (~> 1.8)
|
@@ -50,7 +50,7 @@ GEM
|
|
50
50
|
concurrent-ruby (~> 1.0)
|
51
51
|
mini_mime (1.0.1)
|
52
52
|
mini_portile2 (2.3.0)
|
53
|
-
nokogiri (1.8.
|
53
|
+
nokogiri (1.8.5)
|
54
54
|
mini_portile2 (~> 2.3.0)
|
55
55
|
os (1.0.0)
|
56
56
|
power_assert (1.1.3)
|
@@ -62,9 +62,9 @@ GEM
|
|
62
62
|
redcarpet (3.3.4)
|
63
63
|
ruby-ole (1.2.12.1)
|
64
64
|
rubyzip (1.2.2)
|
65
|
-
selenium-webdriver (3.14.
|
65
|
+
selenium-webdriver (3.14.1)
|
66
66
|
childprocess (~> 0.5)
|
67
|
-
rubyzip (~> 1.2)
|
67
|
+
rubyzip (~> 1.2, >= 1.2.2)
|
68
68
|
spreadsheet (1.1.7)
|
69
69
|
ruby-ole (>= 1.0)
|
70
70
|
test-unit (3.2.8)
|
data/README.md
CHANGED
@@ -698,11 +698,12 @@ values from the table below:
|
|
698
698
|
`chrome_headless` | OS X or Windows (headless - no visible UI)
|
699
699
|
`firefox` | OS X or Windows (Firefox version 55 or greater only)
|
700
700
|
`firefox_headless` | OS X or Windows (headless - no visible UI)
|
701
|
-
`firefox_legacy` | OS X or Windows (Firefox version 47.0.1 only)
|
702
701
|
`safari` | OS X only
|
703
702
|
`ie` | Windows only (IE version 10.x or greater only)
|
704
703
|
|
705
704
|
|
705
|
+
#### Setting desktop browser window size
|
706
|
+
|
706
707
|
To set the size of a desktop browser window, you set the `BROWSER_SIZE` Environment Variable to the desired width and height in pixels as shown below:
|
707
708
|
|
708
709
|
BROWSER_SIZE=1600,1000
|
@@ -712,6 +713,31 @@ To maximize a desktop browser window, you set the `BROWSER_SIZE` Environment Var
|
|
712
713
|
BROWSER_SIZE=max
|
713
714
|
|
714
715
|
|
716
|
+
#### Testing file downloads with desktop browsers
|
717
|
+
|
718
|
+
File download functionality can be tested with locally hosted instances of Chrome or Firefox desktop browsers. Your automation project must include
|
719
|
+
a `/downloads` folder at the same level as the `/config` and `/features` folders, as depicted below:
|
720
|
+
|
721
|
+
my_automation_project
|
722
|
+
├── config
|
723
|
+
├── downloads
|
724
|
+
├── features
|
725
|
+
│ ├── step_definitions
|
726
|
+
│ └── support
|
727
|
+
├── Gemfile
|
728
|
+
└── README.md
|
729
|
+
|
730
|
+
|
731
|
+
When testing file downloads using a local instance of Firefox, you will need to specify the MIME types of the various file types that your tests will
|
732
|
+
be downloading. This is accomplished by setting the `MIME_TYPES` Environment Variable to a comma-delimited string containing the list of MIME types to
|
733
|
+
be accepted. This list is required as it will prevent Firefox from displaying the File Download modal dialog, which will halt your automated tests. An
|
734
|
+
example of a list of MIME types is depicted below:
|
735
|
+
|
736
|
+
MIME_TYPES='images/jpeg, application/pdf, application/octet-stream'
|
737
|
+
|
738
|
+
A detailed list of file MIME types can be found [here](https://www.freeformatter.com/mime-types-list.html)
|
739
|
+
|
740
|
+
|
715
741
|
### Locally hosted emulated mobile web browser
|
716
742
|
|
717
743
|
You can run your tests against mobile device browsers that are emulated within a locally hosted instance of a Chrome desktop browser on OS X or
|
@@ -721,47 +747,47 @@ the `WEB_BROWSER` Environment Variable must be set to one of the values from the
|
|
721
747
|
|
722
748
|
`WEB_BROWSER` | `HOST_BROWSER` | **CSS Screen Dimensions** | **Default Orientation** | **OS Version**
|
723
749
|
----------------------|----------------------|-----------|----------|---------
|
724
|
-
`ipad` |`chrome` |1024 x 768
|
725
|
-
`ipad_pro` |`chrome` |1366 x 1024|landscape |iOS 12
|
726
|
-
`ipad_pro_10_5` |`chrome` |1112 x 834
|
727
|
-
`ipad_chrome` |`chrome` |1024 x 768
|
728
|
-
`ipad_firefox` |`chrome` |1024 x 768
|
729
|
-
`ipad_edge` |`chrome` |1024 x 768
|
730
|
-
`android_tablet` |`chrome` |1024 x 768
|
731
|
-
`kindle_fire` |`chrome` |1024 x 600
|
732
|
-
`kindle_firehd7` |`chrome` |800 x 480
|
733
|
-
`kindle_firehd8` |`chrome` |1280 x 800
|
750
|
+
`ipad` |`chrome` |1024 x 768 |landscape |iOS 12
|
751
|
+
`ipad_pro` |`chrome` |1366 x 1024 |landscape |iOS 12
|
752
|
+
`ipad_pro_10_5` |`chrome` |1112 x 834 |landscape |iOS 12
|
753
|
+
`ipad_chrome` |`chrome` |1024 x 768 |landscape |iOS 12 - Mobile Chrome browser for iOS
|
754
|
+
`ipad_firefox` |`chrome` |1024 x 768 |landscape |iOS 12 - Mobile Firefox browser for iOS
|
755
|
+
`ipad_edge` |`chrome` |1024 x 768 |landscape |iOS 12 - Mobile Edge browser for iOS
|
756
|
+
`android_tablet` |`chrome` |1024 x 768 |landscape |Android 3.0
|
757
|
+
`kindle_fire` |`chrome` |1024 x 600 |landscape |
|
758
|
+
`kindle_firehd7` |`chrome` |800 x 480 |landscape |Fire OS 3
|
759
|
+
`kindle_firehd8` |`chrome` |1280 x 800 |landscape |Fire OS 5
|
734
760
|
`kindle_firehd10` |`chrome` |1920 x 1200 |landscape |Fire OS 5
|
735
|
-
`surface` |`chrome` |1366 x 768
|
736
|
-
`blackberry_playbook` |`chrome` |1024 x 600
|
737
|
-
`samsung_galaxy_tab` |`chrome` |1280 x 800
|
738
|
-
`google_nexus7` |`chrome` |960 x 600
|
739
|
-
`google_nexus9` |`chrome` |1024 x 768
|
740
|
-
`google_nexus10` |`chrome` |1280 x 800
|
741
|
-
`iphone6` |`chrome` |375 x 667
|
742
|
-
`iphone6_plus` |`chrome` |414 x 736
|
743
|
-
`iphone7` |`chrome` |375 x 667
|
744
|
-
`iphone7_plus` |`chrome` |414 x 736
|
745
|
-
`iphone7_chrome` |`chrome` |375 x 667
|
746
|
-
`iphone7_firefox` |`chrome` |375 x 667
|
747
|
-
`iphone7_edge` |`chrome` |375 x 667
|
748
|
-
`iphone8` |`chrome` |375 x 667
|
749
|
-
`iphone8_plus` |`chrome` |414 x 736
|
750
|
-
`iphonex` |`chrome` |375 x 812
|
751
|
-
`android_phone` |`chrome` |360 x 640
|
752
|
-
`nexus6` |`chrome` |411 x 731
|
753
|
-
`pixel` |`chrome` |411 x 731
|
754
|
-
`pixel_xl` |`chrome` |411 x 731
|
755
|
-
`samsung_galaxy_s4` |`chrome` |360 x 640
|
756
|
-
`samsung_galaxy_s5` |`chrome` |360 x 640
|
757
|
-
`samsung_galaxy_s6` |`chrome` |360 x 640
|
758
|
-
`windows_phone7` |`chrome` |320 x 480
|
759
|
-
`windows_phone8` |`chrome` |320 x 480
|
760
|
-
`lumia_950_xl` |`chrome` |360 x 640
|
761
|
-
`blackberry_z10` |`chrome` |384 x 640
|
762
|
-
`blackberry_z30` |`chrome` |360 x 640
|
763
|
-
`blackberry_leap` |`chrome` |360 x 640
|
764
|
-
`blackberry_passport` |`chrome` |504 x 504
|
761
|
+
`surface` |`chrome` |1366 x 768 |landscape |
|
762
|
+
`blackberry_playbook` |`chrome` |1024 x 600 |landscape |BlackBerry Tablet OS
|
763
|
+
`samsung_galaxy_tab` |`chrome` |1280 x 800 |landscape |Android 4.0.4
|
764
|
+
`google_nexus7` |`chrome` |960 x 600 |landscape |Android 4.4.4
|
765
|
+
`google_nexus9` |`chrome` |1024 x 768 |landscape |Android 5.1
|
766
|
+
`google_nexus10` |`chrome` |1280 x 800 |landscape |Android 5.1
|
767
|
+
`iphone6` |`chrome` |375 x 667 |portrait |iOS 12
|
768
|
+
`iphone6_plus` |`chrome` |414 x 736 |portrait |iOS 12
|
769
|
+
`iphone7` |`chrome` |375 x 667 |portrait |iOS 12
|
770
|
+
`iphone7_plus` |`chrome` |414 x 736 |portrait |iOS 12
|
771
|
+
`iphone7_chrome` |`chrome` |375 x 667 |portrait |iOS 12 - Mobile Chrome browser for iOS
|
772
|
+
`iphone7_firefox` |`chrome` |375 x 667 |portrait |iOS 12 - Mobile Firefox browser for iOS
|
773
|
+
`iphone7_edge` |`chrome` |375 x 667 |portrait |iOS 12 - Microsoft Edge browser for iOS
|
774
|
+
`iphone8` |`chrome` |375 x 667 |portrait |iOS 12
|
775
|
+
`iphone8_plus` |`chrome` |414 x 736 |portrait |iOS 12
|
776
|
+
`iphonex` |`chrome` |375 x 812 |portrait |iOS 12
|
777
|
+
`android_phone` |`chrome` |360 x 640 |portrait |Android 4.2.1
|
778
|
+
`nexus6` |`chrome` |411 x 731 |portrait |Android 6
|
779
|
+
`pixel` |`chrome` |411 x 731 |portrait |Android 8
|
780
|
+
`pixel_xl` |`chrome` |411 x 731 |portrait |Android 8
|
781
|
+
`samsung_galaxy_s4` |`chrome` |360 x 640 |portrait |Android 5.0.1
|
782
|
+
`samsung_galaxy_s5` |`chrome` |360 x 640 |portrait |Android 6.0.1
|
783
|
+
`samsung_galaxy_s6` |`chrome` |360 x 640 |portrait |Android 6.0.1
|
784
|
+
`windows_phone7` |`chrome` |320 x 480 |portrait |Windows Phone OS 7.5
|
785
|
+
`windows_phone8` |`chrome` |320 x 480 |portrait |Windows Phone OS 8.0
|
786
|
+
`lumia_950_xl` |`chrome` |360 x 640 |portrait |Windows Phone OS 10
|
787
|
+
`blackberry_z10` |`chrome` |384 x 640 |portrait |BlackBerry 10 OS
|
788
|
+
`blackberry_z30` |`chrome` |360 x 640 |portrait |BlackBerry 10 OS
|
789
|
+
`blackberry_leap` |`chrome` |360 x 640 |portrait |BlackBerry 10 OS
|
790
|
+
`blackberry_passport` |`chrome` |504 x 504 |square |BlackBerry 10 OS
|
765
791
|
|
766
792
|
To change the emulated device's screen orientation from the default setting, set the `ORIENTATION` Environment Variable to either `portrait` or `landscape`.
|
767
793
|
|
@@ -872,6 +898,7 @@ for information regarding the specific capabilities.
|
|
872
898
|
`BROWSER_SIZE` | [Optional] Specify width, height of browser window
|
873
899
|
`RECORD_VIDEO` | [Optional] Enable screen video recording during test execution (`true` or `false`)
|
874
900
|
`TIME_ZONE` | [Optional] Specify custom time zone. Refer to `browserstack.timezone` capability in chart
|
901
|
+
`IP_GEOLOCATION` | [Optional] Specify IP Geolocation. Refer to [IP Geolocation](https://www.browserstack.com/automate/ip-geolocation) to select a country code.
|
875
902
|
`SELENIUM_VERSION` | [Optional] Specify Selenium WebDriver version to use
|
876
903
|
`CONSOLE_LOGS` | [Optional] Used to capture browser console logs. Refer to `browserstack.console` capability in chart
|
877
904
|
`WD_VERSION` | [Optional] Specify browser-specific WebDriver version to use. Refer to `browserstack.geckodriver`, `browserstack.ie.driver`, and `browserstack.safari.driver` capabilities in chart
|
@@ -1055,7 +1082,6 @@ text with the Subdomain specified on the Grid Configuration Parameters section o
|
|
1055
1082
|
|
1056
1083
|
chrome_headless: WEB_BROWSER=chrome_headless <%= desktop %>
|
1057
1084
|
firefox_headless: WEB_BROWSER=firefox_headless <%= desktop %>
|
1058
|
-
firefox_legacy: WEB_BROWSER=firefox_legacy <%= desktop %>
|
1059
1085
|
|
1060
1086
|
#==============
|
1061
1087
|
# profile for Selenium Grid and Dockerized Selenium Grid hosted desktop web browsers
|
@@ -1073,9 +1099,6 @@ text with the Subdomain specified on the Grid Configuration Parameters section o
|
|
1073
1099
|
ipad_chrome: WEB_BROWSER=ipad_chrome HOST_BROWSER=chrome <%= tablet %>
|
1074
1100
|
ipad_firefox: WEB_BROWSER=ipad_firefox HOST_BROWSER=chrome <%= tablet %>
|
1075
1101
|
ipad_edge: WEB_BROWSER=ipad_edge HOST_BROWSER=chrome <%= tablet %>
|
1076
|
-
iphone: WEB_BROWSER=iphone HOST_BROWSER=chrome <%= mobile %>
|
1077
|
-
iphone4: WEB_BROWSER=iphone4 HOST_BROWSER=chrome <%= mobile %>
|
1078
|
-
iphone5: WEB_BROWSER=iphone5 HOST_BROWSER=chrome <%= mobile %>
|
1079
1102
|
iphone6: WEB_BROWSER=iphone6 HOST_BROWSER=chrome <%= mobile %>
|
1080
1103
|
iphone6_plus: WEB_BROWSER=iphone6_plus HOST_BROWSER=chrome <%= mobile %>
|
1081
1104
|
iphone7: WEB_BROWSER=iphone7 HOST_BROWSER=chrome <%= mobile %>
|
@@ -9,10 +9,14 @@ module TestCentricity
|
|
9
9
|
include Capybara::DSL
|
10
10
|
|
11
11
|
attr_accessor :bs_local
|
12
|
+
attr_accessor :downloads_path
|
12
13
|
|
13
14
|
def self.initialize_web_driver(app_host = nil)
|
14
15
|
Capybara.app_host = app_host unless app_host.nil?
|
15
16
|
browser = ENV['WEB_BROWSER']
|
17
|
+
# set downloads folder path
|
18
|
+
@downloads_path = "#{Dir.pwd}/downloads"
|
19
|
+
@downloads_path = @downloads_path.tr('/', "\\") if OS.windows?
|
16
20
|
|
17
21
|
# assume that we're testing within a local desktop web browser
|
18
22
|
Environ.driver = :webdriver
|
@@ -64,12 +68,6 @@ module TestCentricity
|
|
64
68
|
Capybara.app_host = url
|
65
69
|
end
|
66
70
|
|
67
|
-
# @deprecated Correct webdriver is now automatically loaded
|
68
|
-
# Set the WebDriver path for Chrome, Firefox, IE, or Edge browsers
|
69
|
-
def self.set_webdriver_path(project_path)
|
70
|
-
warn "[DEPRECATION] 'TestCentricity::WebDriverConnect.set_webdriver_path' is deprecated. Correct webdrivers are now automatically loaded."
|
71
|
-
end
|
72
|
-
|
73
71
|
def self.initialize_browser_size
|
74
72
|
# tile browser windows if running in multiple parallel threads and BROWSER_TILE environment variable is true
|
75
73
|
if ENV['PARALLEL'] && ENV['BROWSER_TILE']
|
@@ -174,7 +172,7 @@ module TestCentricity
|
|
174
172
|
browser = ENV['WEB_BROWSER'].downcase.to_sym
|
175
173
|
|
176
174
|
case browser
|
177
|
-
when :firefox, :chrome, :ie, :safari, :edge
|
175
|
+
when :firefox, :chrome, :ie, :safari, :edge
|
178
176
|
Environ.platform = :desktop
|
179
177
|
when :chrome_headless, :firefox_headless
|
180
178
|
Environ.platform = :desktop
|
@@ -191,20 +189,38 @@ module TestCentricity
|
|
191
189
|
Capybara::Selenium::Driver.new(app, browser: browser, desired_capabilities: desired_caps)
|
192
190
|
when :ie, :edge
|
193
191
|
Capybara::Selenium::Driver.new(app, browser: browser)
|
194
|
-
when :firefox_legacy
|
195
|
-
Capybara::Selenium::Driver.new(app, browser: :firefox, marionette: false)
|
196
192
|
when :firefox, :firefox_headless
|
197
193
|
profile = Selenium::WebDriver::Firefox::Profile.new
|
198
|
-
profile['browser.download.dir'] =
|
194
|
+
profile['browser.download.dir'] = @downloads_path
|
199
195
|
profile['browser.download.folderList'] = 2
|
200
|
-
profile['browser.
|
196
|
+
profile['browser.download.manager.showWhenStarting'] = false
|
197
|
+
profile['browser.download.manager.closeWhenDone'] = true
|
198
|
+
profile['browser.download.manager.showAlertOnComplete'] = false
|
199
|
+
profile['browser.download.manager.alertOnEXEOpen'] = false
|
200
|
+
profile['browser.download.manager.useWindow'] = false
|
201
|
+
profile['browser.helperApps.alwaysAsk.force'] = false
|
201
202
|
profile['pdfjs.disabled'] = true
|
203
|
+
|
204
|
+
mime_types = ENV['MIME_TYPES'] || 'images/jpeg, application/pdf, application/octet-stream'
|
205
|
+
profile['browser.helperApps.neverAsk.saveToDisk'] = mime_types
|
206
|
+
|
202
207
|
profile['intl.accept_languages'] = ENV['LOCALE'] if ENV['LOCALE']
|
203
208
|
options = Selenium::WebDriver::Firefox::Options.new(profile: profile)
|
204
209
|
options.args << '--headless' if browser == :firefox_headless
|
205
210
|
Capybara::Selenium::Driver.new(app, browser: :firefox, options: options)
|
206
211
|
when :chrome, :chrome_headless
|
207
|
-
|
212
|
+
if browser == :chrome
|
213
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
214
|
+
|
215
|
+
prefs = {
|
216
|
+
prompt_for_download: false,
|
217
|
+
directory_upgrade: true,
|
218
|
+
default_directory: @downloads_path
|
219
|
+
}
|
220
|
+
options.add_preference(:download, prefs)
|
221
|
+
else
|
222
|
+
options = Selenium::WebDriver::Chrome::Options.new(args: %w[headless disable-gpu no-sandbox])
|
223
|
+
end
|
208
224
|
options.add_argument('--disable-infobars')
|
209
225
|
options.add_argument("--lang=#{ENV['LOCALE']}") if ENV['LOCALE']
|
210
226
|
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
|
@@ -284,7 +300,7 @@ module TestCentricity
|
|
284
300
|
capabilities['browserstack.local'] = 'true' if ENV['TUNNELING']
|
285
301
|
|
286
302
|
case browser.downcase.to_sym
|
287
|
-
when :ie
|
303
|
+
when :ie, :edge
|
288
304
|
capabilities['ie.fileUploadDialogTimeout'] = 10000
|
289
305
|
capabilities['ie.ensureCleanSession'] = 'true'
|
290
306
|
capabilities['ie.browserCommandLineSwitches'] = 'true'
|
@@ -123,14 +123,14 @@ module TestCentricity
|
|
123
123
|
|
124
124
|
# Return audio currentTime property
|
125
125
|
#
|
126
|
-
# @return [
|
126
|
+
# @return [Float] current playback position in seconds
|
127
127
|
# @example
|
128
128
|
# current_player_time = audio_player.current_time
|
129
129
|
#
|
130
130
|
def current_time
|
131
131
|
obj, = find_element(visible = :all)
|
132
132
|
object_not_found_exception(obj, :audio)
|
133
|
-
obj.native.attribute('currentTime')
|
133
|
+
obj.native.attribute('currentTime').to_f
|
134
134
|
end
|
135
135
|
|
136
136
|
# Return audio defaultPlaybackRate property
|
@@ -147,14 +147,14 @@ module TestCentricity
|
|
147
147
|
|
148
148
|
# Return audio duration property
|
149
149
|
#
|
150
|
-
# @return [
|
150
|
+
# @return [Float] duration of audio
|
151
151
|
# @example
|
152
152
|
# how_long = audio_player.duration
|
153
153
|
#
|
154
154
|
def duration
|
155
155
|
obj, = find_element(visible = :all)
|
156
156
|
object_not_found_exception(obj, :audio)
|
157
|
-
obj.native.attribute('duration')
|
157
|
+
obj.native.attribute('duration').to_f
|
158
158
|
end
|
159
159
|
|
160
160
|
# Return audio playbackRate property
|
@@ -123,14 +123,14 @@ module TestCentricity
|
|
123
123
|
|
124
124
|
# Return video currentTime property
|
125
125
|
#
|
126
|
-
# @return [
|
126
|
+
# @return [Float] current playback position in seconds
|
127
127
|
# @example
|
128
128
|
# current_player_time = video_player.current_time
|
129
129
|
#
|
130
130
|
def current_time
|
131
131
|
obj, = find_element
|
132
132
|
object_not_found_exception(obj, nil)
|
133
|
-
obj.native.attribute('currentTime')
|
133
|
+
obj.native.attribute('currentTime').to_f
|
134
134
|
end
|
135
135
|
|
136
136
|
# Return video defaultPlaybackRate property
|
@@ -147,14 +147,14 @@ module TestCentricity
|
|
147
147
|
|
148
148
|
# Return video duration property
|
149
149
|
#
|
150
|
-
# @return [
|
150
|
+
# @return [Float] duration of video
|
151
151
|
# @example
|
152
152
|
# how_long = video_player.duration
|
153
153
|
#
|
154
154
|
def duration
|
155
155
|
obj, = find_element
|
156
156
|
object_not_found_exception(obj, nil)
|
157
|
-
obj.native.attribute('duration')
|
157
|
+
obj.native.attribute('duration').to_f
|
158
158
|
end
|
159
159
|
|
160
160
|
# Return video playbackRate property
|
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.19
|
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-10-
|
11
|
+
date: 2018-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|