Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove switch_to_default_context #530

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions lib/appium_lib_core/common/base/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -434,18 +434,6 @@ def within_context(context, &block)
block_given? ? @bridge.within_context(context, &block) : @bridge.within_context(context)
end

# @deprecated Use set context with proper context name instead.
# Change to the default context. This is equivalent to +set_context nil+.
#
# @example
#
# @driver.switch_to_default_context
#
def switch_to_default_context
::Appium::Logger.warn '[DEPRECATION] Please set proper context instead of calling this method.'
@bridge.switch_to_default_context
end

# @return [String] The context currently being used.
#
# @example
Expand Down
4 changes: 0 additions & 4 deletions lib/appium_lib_core/common/device/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ def within_context(context)
end
end

def switch_to_default_context
set_context nil
end

def current_context
execute :current_context
end
Expand Down
2 changes: 1 addition & 1 deletion lib/appium_lib_core/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def extended(_mod)
:hide_keyboard, :is_keyboard_shown,
:ime_activate, :ime_available_engines, :ime_active_engine, :ime_activated, :ime_deactivate,
:get_settings, :update_settings,
:within_context, :switch_to_default_context, :current_context, :available_contexts, :set_context,
:within_context, :current_context, :available_contexts, :set_context,
:push_file, :pull_file, :pull_folder,
:keyevent, :press_keycode, :long_press_keycode,
:match_images_features, :find_image_occurrence, :get_images_similarity, :compare_images,
Expand Down
Loading