示例#1
0
"""
import time
import logging
import re
import traceback
import uiautomator_manager as m
import login_getter as getter
import os
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from wpyscripts.common.utils import time_snap

logger = logging.getLogger("wetest")

uiauto = m.get_uiautomator()


def __click_by_step__(obj, step, number):
    if obj.exists:
        info = obj.info
        local_x = (info['bounds']['left'] + info['bounds']['right']) / 2
        local_y = info['bounds']['bottom']
        for y in range(local_y, local_y + step * number, step):
            uiauto.click(local_x, y)
        return


def _login_edit_box(account, pwd):
    logger.info("login edit box...")
    logins = getter.get_login()
示例#2
0
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://opensource.org/licenses/MIT
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

"""
import time
import logging
import re
import traceback
import uiautomator_manager as m
import login_getter as getter
from wpyscripts.common.utils import time_snap

logger = logging.getLogger("wetest")

uiauto = m.get_uiautomator()


def __click_by_step__(obj, step, number):
    if obj.exists:
        info = obj.info
        local_x = (info['bounds']['left'] + info['bounds']['right']) / 2
        local_y = info['bounds']['bottom']
        for y in range(local_y, local_y + step * number, step):
            uiauto.click(local_x, y)
        return


def _login_edit_box(account, pwd):
    logins = getter.get_login()
    if logins and len(logins) > 0: