from lib_python import execution, steps, variables
from lib_python.baseObjects.AppiumObject import AppiumObject


def invoke_managed_code_crash():
    invocation_button = AppiumObject(variables.driver, "btnCrash")
    invocation_button.wait_for(30)
    invocation_button.click()
    execution.passed()

steps.new_step("Activity - Invoke managed code crash", invoke_managed_code_crash)


def invoke_native_code_crash():
    invocation_button = AppiumObject(variables.driver, "btnNDKCrash")
    invocation_button.wait_for(30)
    invocation_button.click()
    execution.passed()

steps.new_step("Activity - Invoke native code crash", invoke_native_code_crash)
