• 多设备monkey测试工具


    import glob
    import json
    import logging
    import os
    import re
    import time
    import tkinter as tk
    import tkinter.messagebox

    window = tk.Tk()

    window.title("Demo APP")

    width = 640
    height = 730

    # 设置窗口适应属性
    window.resizable(width=False, height=False)
    window.attributes("-alpha",0.7)
    window.attributes('-toolwindow', False,
    '-alpha', 1,
    '-fullscreen', False,
    '-topmost', True)
    # window.overrideredirect(http://www.my516.com)

    # 获取当前屏幕分辨率
    screenwidth = window.winfo_screenwidth()
    screenheight = window.winfo_screenheight()

    # 根据分辨率设置窗口大小
    alignstr = '%dx%d+%d+%d' % (width, height, (screenwidth-width)/1, (screenheight-height)/5)
    window.geometry(alignstr)

    # ----frame-----
    frame_main1 = tk.Frame(window, bg = "#F2F2F2", height=100, width=360)
    frame_main1.grid(column=1,row=1,padx=10,pady=10)

    frame_main2 = tk.Frame(window, bg = "#F2F2F2", height=100, width=400)
    frame_main2.grid(column=2,row=1)

    frame_main3 = tk.Frame(window, bg = "#F2F2F2", height=200, width=370)
    frame_main3.grid(column=1,row=2)

    frame_main4 = tk.Frame(window, bg ="#F2F2F2", height=200, width=360)
    frame_main4.grid(column=2,row=2)

    frame_main5 = tk.Frame(window, bg = "#F2F2F2", height=300, width=720)
    frame_main5.grid(column=1,row=3,columnspan=2,padx=15,pady=15)

    # -----menu菜单功能,暂时不要后续添加--------
    # meun_main = tk.Menu()
    # # meun_main.grid()
    # filemenu = tk.Menu(meun_main, tearoff=1)
    # meun_main.add_cascade(label='File', menu=filemenu)
    # filemenu.add_command(label='Monkey')
    # filemenu.add_command(label='Screen')
    # filemenu.add_command(label='Instructions')
    # filemenu.add_command(label='About')
    # window.config(menu = filemenu)

    # -------Log缓存区域,显示自定义日志--------
    lable_log=tk.Label(frame_main5,text="日志区",font = ("微软雅黑",14))
    lable_log.grid(column=1,row=1)

    text_log = tk.Text(frame_main5,bg="#5B5B5B",fg="#FFFFFF")
    text_log.grid(column=1,row=2)


    def clear_log():
    text_log.delete("1.0","end")

    button_clearLog = tk.Button(frame_main5,text="Clear",font = ("微软雅黑",8),bg="#836FFF", fg= "#FFFFFF",command=clear_log)
    button_clearLog.grid(column=2,row=2,sticky="n")

    # text_log.insert("end","adasd21dadd")

  • 相关阅读:
    HttpClient
    spring入门
    morphia进阶
    morphia基本API方法
    mangodb数据库框架morphia注解
    学与思
    解决vscode执行yarn启动项目报错
    使用swiper+动画实现轮播图自动播放
    vue中使用el-tree实现一行显示多条数据
    使用git命令提交部分修改代码
  • 原文地址:https://www.cnblogs.com/hyhy904/p/11284625.html
Copyright © 2020-2023  润新知