SPDX-License-Identifier: Apache-2.0
"""
# Used defined libraries
from testlib.base.base_utils import parse_args
from testlib.scripts.android.ui import ui_steps
import time

# ############# Get parameters ############
args = parse_args()

# Setup
ui_steps.press_home(serial=args["serial"])()

# Run
ui_steps.enable_developer_options(serial=args["serial"])()
ui_steps.click_button_common(view_to_find={"text": "Developer options"},
                             view_to_check={"text": "OEM unlocking"},
                             serial=args["serial"])()

# for full report
ui_steps.click_button_common(view_to_find={"text": "Take bug report"},
                             view_to_check={"text": "Interactive report"},
                             serial=args["serial"])()
ui_steps.click_button_common(view_to_find={"text": "Full report"},
                             serial=args["serial"])()
ui_steps.click_button_common(view_to_find={"text": "REPORT"},
                             serial=args["serial"])()

# for interactive report
ui_steps.click_button_common(view_to_find={"text": "Take bug report"},
コード例 #2
0
from testlib.base.base_utils import get_args
from testlib.scripts.android.ui import ui_steps

# ############# Get parameters ############
globals().update(vars(get_args(sys.argv)))
args = {}
if script_args[0].upper() != 'NONE':
    for entry in script_args:
        key, val = entry.split("=")
        args[key] = val

# Setup
ui_steps.press_home(serial=serial)()

# Run
ui_steps.enable_developer_options(serial=serial)()
ui_steps.click_button_common(view_to_find={"text": "Developer options"},
                             view_to_check={"text": "OEM unlocking"},
                             serial=serial)()

#option 1 animation off

ui_steps.click_button_common(
    view_to_find={"text": "Transition animation scale"},
    view_to_check={"text": "Animation off"},
    serial=serial)()
ui_steps.click_button_common(view_to_find={"text": "Animation off"},
                             serial=serial)()
ui_steps.wait_for_view_common(
    view_to_find={"text": "Animation off"},
    second_view_to_find={"className": "android.widget.TextView"},