我想从SAP中提取一个文件,但是,我需要在导出时动态显示该文件的名称,以提取该文件的时间为准。
例如,如果它是在12:00提取的,我需要名称为“1”;12-00.XLSX〃;
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").resizeWorkingPane 142,25,false
session.findById("wnd[0]/tbar[0]/okcd").text = "zv15"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtP_VKORG").text = "f86c"
session.findById("wnd[0]/usr/ctxtP_VKBUR").text = "br01"
session.findById("wnd[0]/usr/ctxtS_MONTH-LOW").text = "1"
session.findById("wnd[0]/usr/ctxtS_MONTH-HIGH").text = "12"
session.findById("wnd[0]/usr/ctxtS_MONTH-HIGH").setFocus
session.findById("wnd[0]/usr/ctxtS_MONTH-HIGH").caretPosition = 2
session.findById("wnd[0]/tbar[1]/btn[8]").press
session.findById("wnd[0]/mbar/menu[4]/menu[11]").select
session.findById("wnd[1]/usr/ctxtLAST_LOGON_TIME").setFocus
session.findById("wnd[1]/usr/ctxtLAST_LOGON_TIME").caretPosition = 8
session.findById("wnd[1]").close
session.findById("wnd[0]/tbar[1]/btn[43]").press
session.findById("wnd[1]/usr/ctxtDY_FILENAME").text = "11-50-30.XLSX"
session.findById("wnd[1]/usr/ctxtDY_PATH").setFocus
session.findById("wnd[1]/usr/ctxtDY_PATH").caretPosition = 8
session.findById("wnd[1]/tbar[0]/btn[0]").press```
软件测试功能测试测试用例文章源自玩技e族-https://www.playezu.com/194057.html 文章源自玩技e族-https://www.playezu.com/194057.html