Skip to content

Commit 51d4486

Browse files
jimvmandreastt
authored andcommitted
rb: get HasNetworkConnection (and specs) to work
Signed-off-by: Andreas Tolfsen <[email protected]>
1 parent 29ea618 commit 51d4486

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

rb/lib/selenium/webdriver/remote/bridge.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ def driver_extensions
8585
DriverExtensions::HasSessionId,
8686
DriverExtensions::Rotatable,
8787
DriverExtensions::HasTouchScreen,
88+
DriverExtensions::HasLocation,
89+
DriverExtensions::HasNetworkConnection,
8890
DriverExtensions::HasRemoteStatus
8991
]
9092
end
@@ -326,7 +328,7 @@ def getNetworkConnection
326328
end
327329

328330
def setNetworkConnection(type)
329-
execute :setNetworkConnection, {}, :type => type
331+
execute :setNetworkConnection, {}, :parameters => {:type => type}
330332
end
331333

332334
#

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
module Selenium::WebDriver::DriverExtensions
44
describe HasNetworkConnection do
5-
compliant_on :browser => nil do
5+
compliant_on :browser => :android do
66
it "can return the network connection type" do
77
expect(driver.network_connection_type).to eq :all
88
end
99

1010
it "can set the network connection type" do
11-
expect { driver.network_connection_type = :airplane_mode }.to
12-
change { driver.network_connection_type }.from(:all).to(:airplane_mode)
11+
expect { driver.network_connection_type = :airplane_mode }.to change { driver.network_connection_type }.from(:all).to(:airplane_mode)
1312
end
1413
end
1514
end

0 commit comments

Comments
 (0)