Skip to content

Commit dd563ce

Browse files
committed
rb - update w3c commands and specs for device location and network connection
1 parent e4142a0 commit dd563ce

File tree

3 files changed

+6
-92
lines changed

3 files changed

+6
-92
lines changed

rb/lib/selenium/webdriver/remote/w3c_bridge.rb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ def driver_extensions
115115
DriverExtensions::HasSessionId,
116116
DriverExtensions::Rotatable,
117117
DriverExtensions::HasTouchScreen,
118-
DriverExtensions::HasLocation,
119-
DriverExtensions::HasNetworkConnection,
120118
DriverExtensions::HasRemoteStatus,
121119
DriverExtensions::HasWebStorage
122120
]
@@ -367,21 +365,19 @@ def getSessionStorageSize
367365
end
368366

369367
def getLocation
370-
obj = execute(:getLocation) || {} # android returns null
371-
Location.new obj['latitude'], obj['longitude'], obj['altitude']
368+
raise Error::WebDriverError::UnsupportedOperationError, 'The W3C standard does not currently support getting location'
372369
end
373370

374-
def setLocation(lat, lon, alt)
375-
loc = {:latitude => lat, :longitude => lon, :altitude => alt}
376-
execute :setLocation, {}, :location => loc
371+
def setLocation(_lat, _lon, _alt)
372+
raise Error::WebDriverError::UnsupportedOperationError, 'The W3C standard does not currently support setting location'
377373
end
378374

379375
def getNetworkConnection
380-
execute :getNetworkConnection
376+
raise Error::WebDriverError::UnsupportedOperationError, 'The W3C standard does not currently support getting network connection'
381377
end
382378

383-
def setNetworkConnection(type)
384-
execute :setNetworkConnection, {}, :parameters => {:type => type}
379+
def setNetworkConnection(_type)
380+
raise Error::WebDriverError::UnsupportedOperationError, 'The W3C standard does not currently support setting network connection'
385381
end
386382

387383
#

rb/spec/integration/selenium/webdriver/location_spec.rb

Lines changed: 0 additions & 48 deletions
This file was deleted.

rb/spec/integration/selenium/webdriver/network_connection_spec.rb

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)