ctrl_pingtest.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Automation-Framework-for-devices 作者: tok-gogogo 项目源码 文件源码
def config_PacketSize(self,time,step,Flag):

        time = string.atoi(time)
        step = string.atoi(step)
        if Flag == 'Up':
            print 'Increasing number of:',time,',increase the step:',step
        elif Flag == 'Down':
            print 'Reduceing number of:',time,',reduce the step:',step
        hwd = win32gui.FindWindow(None,"PingTest")
        edit_packet_up = win32gui.FindWindowEx(hwd, None, 'msctls_updown32', 'Spin1')
        #print edit_packet_up
        self.Mouse_LB_click(edit_packet_up)
        self.shortcut_keys(['Down'])
        self.sleep('1')

        num = time * step
        n = 1
        while n <= num:
            self.shortcut_keys([Flag])
            n = n+1

        return True

    #type:Ping/Stop/Quit/Reset/Clear/Log File:/Error only
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号