• 润乾报表WEB预览导出EXCEL


    from selenium import webdriver
    from pykeyboard import PyKeyboard
    import time
    import os
    
    k = PyKeyboard()
    
    files = os.listdir('H:Report2020')
    
    for f in files:
    
        dr = webdriver.Firefox()
    
        dr.get(
            'http://localhost:6868/demo/reportJsp/preview.jsp?__rpx=%2F' + str(
                f) + '&__rpxHome=E%3A%2FWork%2FdsMin%2FReport2020&__dfxHome=C%3A%2FProgram+Files%2Fraqsoft%2Freport%2Fbin')
        # dr.get('http://localhost:6868/demo/reportJsp/preview.jsp?__rpx=%2F001%E5%90%84%E7%BA%A7%E5%90%84%E7%B1%BB%E6%95%99%E8%82%B2%E6%A0%A1%E6%95%B0%E3%80%81%E6%95%99%E8%81%8C%E5%B7%A5%E6%95%B0%E3%80%81%E4%B8%93%E4%BB%BB%E6%95%99%E5%B8%88%E6%83%85%E5%86%B5.rpx&__rpxHome=E%3A%2FWork%2FdsMin%2FReport2020&__dfxHome=C%3A%2FProgram+Files%2Fraqsoft%2Freport%2Fbin')
        aaa = dr.find_element_by_xpath('//*[@class="ICOhover"]')
    
        aaa.click()
        time.sleep(1)
        bbb = dr.find_element_by_xpath('//*[@class="l-btn-text"]')
        bbb.click()
        time.sleep(1)
        k.press_key(k.down_key)
        time.sleep(1)
        k.press_key(k.enter_key)
        time.sleep(3)
        dr.close()
  • 相关阅读:
    C语言寒假大作战04
    C语言寒假大作战03
    C语言寒假大作战02
    C语言寒假大作战01
    C语言I作业12—学期总结
    C语言I博客作业11
    C语言I博客作业10
    预习非数值数据的编码方式
    计算机组成与系统结构作业01
    C语言||作业01
  • 原文地址:https://www.cnblogs.com/kgdxpr/p/14760717.html
Copyright © 2020-2023  润新知