File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ module Device
16
16
get : {
17
17
current_activity : 'session/:session_id/appium/device/current_activity' ,
18
18
current_context : 'session/:session_id/context' ,
19
- available_contexts : 'session/:session_id/contexts' ,
20
19
}
21
20
}
22
21
@@ -113,6 +112,13 @@ def extended(mod)
113
112
pair . each_pair { |command , path | add_endpoint_method command , path , verb }
114
113
end
115
114
115
+ add_endpoint_method ( :available_contexts , 'session/:session_id/contexts' , :get ) do
116
+ def available_contexts
117
+ # return empty array instead of nil on failure
118
+ execute ( :available_contexts , { } ) || [ ]
119
+ end
120
+ end
121
+
116
122
add_endpoint_method ( :app_strings , 'session/:session_id/appium/app/strings' ) do
117
123
def app_strings language = nil
118
124
opts = language ? { language : language } : { }
You can’t perform that action at this time.
0 commit comments