Skip to content

Commit

Permalink
Firefox: Implementing ability to return non-boolean capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Feb 4, 2016
1 parent 0181ae5 commit c09fa0e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions javascript/firefox-driver/js/nsCommandProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -757,9 +757,14 @@ nsCommandProcessor.prototype.getSessionCapabilities = function(response) {
try {
response.value[cap] = prefStore.getBoolPref(pref);
} catch (e) {
// An exception is thrown if the saught preference is not available.
// For instance, a Firefox version not supporting HTML5 will not have
// a preference for webStorageEnabled.
try {
response.value[cap] = prefStore.getIntPref(pref);
} catch (e) {
try {
response.value[cap] = prefStore.getCharPref(pref);
} catch (e) {
}
}
}
}

Expand Down
1 change: 1 addition & 0 deletions javascript/firefox-driver/js/sessionstore.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ wdSessionStoreService.CAPABILITY_PREFERENCE_MAPPING = {
'webStorageEnabled': 'dom.storage.enabled',
'applicationCacheEnabled': 'browser.cache.offline.enable',
'databaseEnabled': 'dom.indexedDB.enabled',
'elementScrollBehavior' : 'webdriver.elementScrollBehavior',
'locationContextEnabled': 'geo.enabled',
'browserConnectionEnabled': 'dom.network.enabled',
'acceptSslCerts': 'webdriver_accept_untrusted_certs',
Expand Down

0 comments on commit c09fa0e

Please sign in to comment.