main.py 545 B

1234567891011121314151617
  1. # coding=utf-8
  2. from fastAutoTest.core.wx.wxEngine import WxDriver
  3. import os
  4. # 进入小程序
  5. if __name__ == '__main__':
  6. wxDriver = WxDriver()
  7. wxDriver.initDriver()
  8. # wxDriver.clickElementByXpath('/html/body/div[1]/div/div[3]/p')
  9. wxDriver.clickFirstElementByText('进入平台')
  10. wxDriver.returnLastPage()
  11. # wxDriver.returnLastPage()
  12. # 截图
  13. dirPath = os.path.split(os.path.realpath(__file__))[0]
  14. PIC_SRC = os.path.join(dirPath, '/screenshot/pic.png')
  15. wxDriver.d.screenshot(PIC_SRC)
  16. wxDriver.close()