Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[RFR] Fix deprecation warnings for switch_to_alert() and log_message() #10237

Merged
merged 1 commit into from
Jul 6, 2020
Merged

[RFR] Fix deprecation warnings for switch_to_alert() and log_message() #10237

merged 1 commit into from
Jul 6, 2020

Conversation

tpapaioa
Copy link
Contributor

@tpapaioa tpapaioa commented Jul 6, 2020

This PR resolves two deprecation warnings:

1.) Replace deprecated use of level="warn" with level="warning" in CFMENavigateStep's log_message() method:

cfme/tests/cloud_infra_common/test_retirement.py::test_set_retirement_date[ec2-no_warning]
  /XXX/cfme/utils/appliance/implementations/ui.py:527: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
    getattr(logger, level)(str_msg)

2.) Replace deprecated use of selenium.switch_to_alert() with selenium.switch_to.alert() in HandleModalsMixin's get_alert() method:

cfme/tests/cloud_infra_common/test_retirement.py::test_set_retirement_date[ec2-no_warning]
  /XXX/cfme/utils/appliance/implementations/common.py:38: DeprecationWarning: use driver.switch_to.alert instead
    return self.selenium.switch_to_alert()

{{ pytest: -v --long-running --use-provider ec2west -k 'test_set_retirement_date[ec2-no_warning]' cfme/tests/cloud_infra_common/test_retirement.py }}

@tpapaioa tpapaioa changed the title [WIPTEST] Fix deprecation warnings for switch_to_alert() and log_message() [RFR] Fix deprecation warnings for switch_to_alert() and log_message() Jul 6, 2020
@mshriver mshriver merged commit c96bedb into ManageIQ:master Jul 6, 2020
@tpapaioa tpapaioa deleted the fix_deprecation_warnings branch July 6, 2020 15:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants