Example #1
0
def step_impl(context):
    win_setup = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT',
                                                 "mozypro")).gui.setup_window
    if win_setup.license_agreement_checked():
        win_setup.choose_license_agreement()
    if win_setup.location_change_checked():
        win_setup.choose_location_change()
    win_setup.install_start()
Example #2
0
def step_impl(context, num):
    path = "C:\\"
    count = 0
    while (count < int(num)):
        subpath = random.randrange(1, 100)
        path = path + str(subpath) + "\\"
        count += 1
    location = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT',
                                                "mozypro")).gui.setup_window
    location.set_location(path)
    time.sleep(2)
def step_impl(context):
    winclient = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT', "mozypro"))
    result = winclient.controller.search_result_in_history()
    if result[0] == -9:
        LogHelper.info("backup is cancelled successfully")
    else:
        LogHelper.error("backup is cancelled unsuccessfully")
Example #4
0
def step_impl(context, operation):
    selecting = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT',
                                                 "mozypro")).gui.setup_window
    if operation.upper() == "DESELECT":
        if selecting.location_change_checked():
            selecting.choose_location_change()
    else:
        if not selecting.location_change_checked():
            selecting.choose_location_change()
Example #5
0
def step_impl(context, activate_type, client):
    result = None
    oem_client = RUNNER_CONFIG.get('OEM_CLIENT', "mozypro")
    env = RUNNER_CONFIG.get('ENVIRONMENT', "QA12")
    email = ""
    password = ""
    productkey = ""
    encryption_key = ""
    subdomain = ""
    relytrust = ""

    for row in context.table:
        if oem_client.upper() == row.get(
                'oem').upper() and env.upper() == row.get('env').upper():
            email = row.get('email')
            password = row.get('password')
            productkey = row.get('product_key')
            encryption_type = row.get('encryption_type')
            encryption_key = row.get('encryption_key')
            subdomain = row.get('subdomain')
            relytrust = row.get('rely_trust')
    # if os.environ['activate'] and os.environ['activate'] == str(True):
    context.oem = oem_client
    windowsclient = Windows_Client(oem_client)

    if windowsclient.gui.status_window.client_is_activated():
        pass
    else:
        if client.upper() == "GUI":
            # result = windowsclient.gui.status_window.continuesetupbutton.Click()
            # result = windowsclient.gui.login_dialog.activate(email, password)
            if activate_type.upper() == "KEYLESS":
                result = windowsclient.gui.login_dialog.keyless_activate(
                    email,
                    password,
                    encryption_type,
                    encryption_key,
                    is_exist="existing")
            elif activate_type.upper() == "KEYED":
                result = windowsclient.gui.login_dialog.key_activate(
                    productkey,
                    email,
                    password,
                    encryption_type,
                    encryption_key,
                    is_exist="existing")
                pass
            elif activate_type.upper() == "FEDID":
                context.subdomain = subdomain
                # result = windowsclient.gui.login_dialog.open_fedidpage(subdomain)
                context.execute_steps(unicode("I open fedid SignIn window"))
                # result = windowsclient.gui.login_dialog.fedid_activate(subdomain, relytrust, email, password, encryption_type, encryption_key)
                pass

        else:
            result = windowsclient.cli.activate_keyless(
                email, password, encryption_type, encryption_key)

    (result is not None).should.be(True)
def step_impl(context):
    winclient = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT', "mozypro"))
    import time
    time.sleep(10)
    winclient.gui.restore_panel.select_restore_by_date(
        ConfigAdapter.get_output_path())
    winclient.gui.restore_panel.startrestore()
    winclient.gui.restore_panel.apply()
Example #7
0
def step_impl(context, backupsetname, func):
    root_path = WIN_CONFIG.get('TESTDATA_PATH', "c:/testdata")
    if func == "CLI":
        Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT', "mozypro")).cli.create_backupset(root_path, backupsetname)
    elif func.upper() == "UI":
        # TODO: Further invesigate pywinauto to support right click popup menu
        pass
    else:
        LogHelper.error("ERROR: Only support start backup from MozyUTIL or UI.")
Example #8
0
def step_impl(context, resource):
    win_installer = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT',
                                                     "mozypro")).installer
    win_installer.set_UI(True)
    if resource == "Jenkins":
        win_installer.download_and_install(
            RUNNER_CONFIG.get('BUILD', "543"),
            RUNNER_CONFIG.get('JOB', "kalypso-release"))
    elif resource == "Mozy.com":
        win_installer.download_and_install(RUNNER_CONFIG.get('BUILD', "0"),
                                           RUNNER_CONFIG.get('JOB', "product"))
    time.sleep(5)
Example #9
0
def step_impl(context):
    from lib.platformhelper import PlatformHelper
    if PlatformHelper.is_win():
        from apps.windows.windows_client import Windows_Client
    winclient = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT', "mozypro"))

    if winclient.gui.status_window.client_is_activated():
        winclient.controller.set_unconfigured_status()
        winclient.controller.reset_reg(RUNNER_CONFIG.get(
            'ENVIRONMENT', "QA12"))
        winclient.controller.restart_services(force=True)
Example #10
0
def step_impl(context):
    windowsclient = Windows_Client(context.oem)
    windowsclient.gui.login_dialog.open_fedidpage(context.subdomain)

    FedidSignInPage.visit()
    time.sleep(8)

    FedidSignInPage.select_rely_site()
    FedidSignInPage.continue_signin()

    FedidSignInPage.login(context.fedidusername, context.fedidpwd)
Example #11
0
def step_impl(context, buttonname):
    time.sleep(2)
    win_cancel = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT',
                                                  "mozypro")).gui.setup_window
    if buttonname.upper() == "YES":
        win_cancel.choose_yes_on_cancel()
    elif buttonname.upper() == "NO":
        win_cancel.choose_no_on_cancel()
Example #12
0
def step_impl(context, type, is_exist, encryption_type, client):
    result = None

    oem_client = RUNNER_CONFIG.get('OEM_CLIENT', "mozypro")
    env = RUNNER_CONFIG.get('ENVIRONMENT', "QA12")
    email = context.user.username
    password = context.user.password

    productkey = context.user.product_keys

    # TODO: Created from BUS Client Configuration
    encryption_type = encryption_type.lower() or "pkey"
    # encryption_type = context.encryption.type or "pkey"
    # encryption_key = context.encryption.key or "test1234"

    windowsclient = Windows_Client(oem_client)

    if windowsclient.gui.status_window.client_is_activated():
        pass
    else:
        if client.upper() == "GUI":
            if type.upper() == "KEYLESS":
                context.multiencryption = False
                result = windowsclient.gui.login_dialog.keyless_activate(
                    email,
                    password,
                    encryptiontype=encryption_type,
                    key="test1234",
                    is_exist=is_exist,
                    multiencryption=context.multiencryption)
            elif type.upper() == "KEYED":
                result = windowsclient.gui.login_dialog.key_activate(
                    productkey,
                    email,
                    password,
                    encryptiontype=encryption_type,
                    key="test1234",
                    is_exist=is_exist,
                    multiencryption=context.multiencryption)
        else:
            if type.upper() == "KEYLESS":
                result = windowsclient.cli.activate_keyless(
                    email,
                    password,
                    encryption_type=encryption_type,
                    key="test1234")
            # elif type.upper() == "KEYED":
            #     result = windowsclient.cli.activate_keyless(email, password, encryption_type="pkey", key="test1234")

    (result is not None).should.be(True)
Example #13
0
def step_impl(context, title):
    windowsclient = Windows_Client(context.oem)
    windowsclient.gui.login_dialog.open_fedidpage(context.subdomain)

    if title == "Sign-In Page":
        FedidSignInPage.visit()
        time.sleep(8)

        FedidSignInPage.select_rely_site()
        FedidSignInPage.continue_signin()

    elif title == "OneLogin":
        print("4. Windows FedId OneLogin")
        pass
def step_impl(context, action, func):
    winclient = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT', "mozypro"))
    if func.upper() == "CLI":
        if action.upper() == "START":
            winclient.cli.start_backup()
        elif action.upper() == "CANCEL":
            winclient.cli.cancel_backup()
    elif func.upper() == "UI":
        if action.upper() == "START":
            winclient.gui.status_window.startbackup()
        elif action.upper() == "CANCEL":
            winclient.gui.status_window.cancelbackup()
    else:
        LogHelper.error(
            "ERROR: Only support start backup from MozyUTIL or UI.")
Example #15
0
 def get_client(product, oem):
     product = product.lower()
     if product == "windows":
         return Windows_Client(oem)
     elif product == "linux":
         return LinuxClient()
         # print "Linux Client"
     elif product == "mac":
         return MacClient(oem)
     elif product == "winfryr":
         return WinFryR_Client()
     elif product == "macfryr":
         return MacFryR_Client()
     elif product == "ios":
         return IOSClient()
     elif product == "android":
         return Android_Client()
     else:
         raise TypeError('Unknown Product.')
Example #16
0
def step_impl(context, activate_type, client):
    oem_client = RUNNER_CONFIG.get('OEM_CLIENT', "mozypro")
    env = RUNNER_CONFIG.get('ENVIRONMENT', "QA12")
    email = ""
    password = ""
    productkey = ""
    encryption_key = ""
    env = "QA12"
    for row in context.table:
        if oem_client.upper() == row.get(
                'oem').upper() and env.upper() == row.get('env').upper():
            email = row.get('email')
            password = row.get('password')
            productkey = row.get('password')
            encryption_type = row.get('encryption_type')
            encryption_key = row.get('encryption_key')
    # if os.environ['activate'] and os.environ['activate'] == str(True):
    windowsclient = Windows_Client(oem_client)

    if windowsclient.gui.status_window.client_is_activated():
        pass
    else:
        if client.upper() == "GUI":
            # result = windowsclient.gui.status_window.continuesetupbutton.Click()
            # result = windowsclient.gui.login_dialog.activate(email, password)
            if activate_type.upper() == "KEYLESS":
                result = windowsclient.gui.login_dialog.keyless_activate(
                    email, password, encryption_type, encryption_key)
            elif activate_type.upper() == "KEY":
                result = windowsclient.gui.login_dialog.key_activate(
                    productkey, encryption_type, encryption_key)
                pass
            elif activate_type.upper() == "FEDID":
                result = windowsclient.gui.login_dialog.fedid_activate(
                    productkey, encryption_type, encryption_key)
                pass

        else:
            result = windowsclient.cli.activate_keyless(
                email, password, encryption_type, encryption_key)

    (result is not None).should.be(True)
def stem_impl(context, panelname):
    time.sleep(2)
    winclient = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT', "mozypro"))
    winclient.gui.settings_window.select_panel(panelname)
    # # )
    # driver = webdriver.Firefox
    # # print driver.command_executor
    # # url = driver.command_executor._url  # "http://127.0.0.1:60622/hub"
    # # print url
    # session_id = driver.session_id
    # print session_id
    #
    # driver = webdriver.Remote(command_executor=url, desired_capabilities={})
    # driver.session_id = session_id
    #
    # print driver
    # print driver.title

    FedidSignInPage.visit()
    import time
    time.sleep(8)
    FedidSignInPage.select_rely_site()
    FedidSignInPage.continue_signin()

    FedidSignInPage.login("*****@*****.**", "abc!@#123")

    from apps.windows.windows_client import Windows_Client
    windowsclient = Windows_Client("mozypro")
    result = windowsclient.gui.login_dialog.fedid_activate("pkey",
                                                           "test1234",
                                                           is_exist="NEW")

    # Allow open Mozy from browser
    # FedidSignInPage.pass_to_client()
Example #19
0
def step_impl(context):
    machine_id = Windows_Client(RUNNER_CONFIG.get(
        'OEM_CLIENT', "mozypro")).controller.get_machine_id()
    context.machine_id = machine_id
    return context.machine_id
Example #20
0
def step_impl(context, windowname):
    if windowname.upper() == "Welcome".upper():
        Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT', "mozypro")).gui.setup_window.open_setupwindow()
    else:
        Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT', "mozypro")).gui.status_window.open(windowname)
Example #21
0
def step_impl(context, client):
    win_controller = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT',
                                                      "mozypro")).controller
    win_controller.is_client_installed()
    isrunning = win_controller.is_client_running()
    isrunning.should.equal(True)
Example #22
0
def step_impl(context):
    testdata_folder = WIN_CONFIG.get('TESTDATA_PATH', "c:/test_data")
    winclient = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT', "mozypro"))
    winclient.gui.filesystem_panel.selectinfilesystem(root_path=testdata_folder)
    winclient.gui.settings_window.applychange()
Example #23
0
def step_impl(context):
    win_controller = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT', "mozypro")).controller
    win_controller.wipe_configuration()
Example #24
0
def step_impl(context, buttonname):
    win_setup = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT',
                                                 "mozypro")).gui.setup_window
    if buttonname.upper() == "NEXT":
        win_setup.apply()
    elif buttonname.upper() == "CANCEL":
        win_setup.cancel()
    elif buttonname.upper() == "FINISH":
        win_setup.finish_and_exit()
    elif buttonname.upper() == "INSTALL":
        win_setup.install_start()
    elif buttonname.upper() == "ACCEPT":
        win_setup.accept()
Example #25
0
def step_impl(context, state):
    status = Windows_Client(RUNNER_CONFIG.get(
        'OEM_CLIENT', "mozypro")).cli.wait_for_state(state.upper())
    status.should.equal(True)
def step_impl(context, action):
    winclient = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT', "mozypro"))
    if action.upper() == "APPLY":
        winclient.gui.login_dialog.change_encrption(apply=True)
    else:
        winclient.gui.login_dialog.change_encrption(apply=False)
Example #27
0
def step_impl(context):
    alert_info = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT',
                                                  "mozypro")).gui.setup_window
    alert_info.alert_info_popup()
Example #28
0
def step_impl(context, path):
    location = Windows_Client(RUNNER_CONFIG.get('OEM_CLIENT',
                                                "mozypro")).gui.setup_window
    location.set_location(path)
    time.sleep(2)
Example #29
0
def step_impl(context):
    oem_client = RUNNER_CONFIG.get('OEM_CLIENT', "mozypro")
    windowsclient = Windows_Client(oem_client)
    if windowsclient.gui.status_window.client_is_activated():
        # windowsclient._controller.clear_config()
        pass