Skip to content

Commit 16598d9

Browse files
authored
chore: remove switch_to_default_context (#530)
1 parent 914fbb5 commit 16598d9

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

lib/appium_lib_core/common/base/driver.rb

-12
Original file line numberDiff line numberDiff line change
@@ -434,18 +434,6 @@ def within_context(context, &block)
434434
block_given? ? @bridge.within_context(context, &block) : @bridge.within_context(context)
435435
end
436436

437-
# @deprecated Use set context with proper context name instead.
438-
# Change to the default context. This is equivalent to +set_context nil+.
439-
#
440-
# @example
441-
#
442-
# @driver.switch_to_default_context
443-
#
444-
def switch_to_default_context
445-
::Appium::Logger.warn '[DEPRECATION] Please set proper context instead of calling this method.'
446-
@bridge.switch_to_default_context
447-
end
448-
449437
# @return [String] The context currently being used.
450438
#
451439
# @example

lib/appium_lib_core/common/device/context.rb

-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ def within_context(context)
2929
end
3030
end
3131

32-
def switch_to_default_context
33-
set_context nil
34-
end
35-
3632
def current_context
3733
execute :current_context
3834
end

lib/appium_lib_core/device.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def extended(_mod)
2929
:hide_keyboard, :is_keyboard_shown,
3030
:ime_activate, :ime_available_engines, :ime_active_engine, :ime_activated, :ime_deactivate,
3131
:get_settings, :update_settings,
32-
:within_context, :switch_to_default_context, :current_context, :available_contexts, :set_context,
32+
:within_context, :current_context, :available_contexts, :set_context,
3333
:push_file, :pull_file, :pull_folder,
3434
:keyevent, :press_keycode, :long_press_keycode,
3535
:match_images_features, :find_image_occurrence, :get_images_similarity, :compare_images,

0 commit comments

Comments
 (0)