@@ -111,7 +111,7 @@ def session_id
111
111
end
112
112
113
113
def create_session ( desired_capabilities )
114
- resp = raw_execute :new_session , { } , { desiredCapabilities : desired_capabilities }
114
+ resp = execute :new_session , { } , { desiredCapabilities : desired_capabilities }
115
115
@session_id = resp [ 'sessionId' ]
116
116
return W3CCapabilities . json_create resp [ 'value' ] if @session_id
117
117
@@ -599,21 +599,10 @@ def convert_locators(how, what)
599
599
# executes a command on the remote server.
600
600
#
601
601
#
602
- # Returns the 'value' of the returned payload
603
- #
604
-
605
- def execute ( *args )
606
- result = raw_execute ( *args )
607
- result . payload . key? ( 'value' ) ? result [ 'value' ] : result
608
- end
609
-
610
- #
611
- # executes a command on the remote server.
612
- #
613
602
# @return [WebDriver::Remote::Response]
614
603
#
615
604
616
- def raw_execute ( command , opts = { } , command_hash = nil )
605
+ def execute ( command , opts = { } , command_hash = nil )
617
606
verb , path = commands ( command ) || raise ( ArgumentError , "unknown command: #{ command . inspect } " )
618
607
path = path . dup
619
608
@@ -628,7 +617,7 @@ def raw_execute(command, opts = {}, command_hash = nil)
628
617
end
629
618
630
619
WebDriver . logger . info ( "-> #{ verb . to_s . upcase } #{ path } " )
631
- http . call verb , path , command_hash
620
+ http . call ( verb , path , command_hash ) [ 'value' ]
632
621
end
633
622
634
623
def escaper
0 commit comments