手把手教你TestComplete_文件读写示例
来源:互联网 发布:人工智能概念股分类 编辑:程序博客网 时间:2024/04/30 20:05
这个纯粹就是提供给懒人的,其实随便翻翻帮助就能搜出来。当然有人会习惯性的使用FSO来进行文件操作,我这里就免了,入乡随俗,既然TestComplete已经提供了aqFile,我就不搞那么多事情了。越简单越好,够用就好。
'文件操作
Sub DoFile
Dim sLogFile
Dim sFileCont
sLogFile = ProjectSuite.Path & "\log\xxx.log"
'创建文件
If Not aqFile.Exists(sLogFile) Then
Call aqFile.Create(sLogFile)
End If
'写入文件
Call aqFile.WriteToTextFile(sLogFile, "Hello, world1!" & vbCrlf , aqFile.ctANSI, True)
Call aqFile.WriteToTextFile(sLogFile, "Hello, world2!" & vbCrlf , aqFile.ctANSI, False)
'读出文件
sFileCont=aqFile.ReadWholeTextFile(sLogFile,aqFile.ctANSI)
Log.Message(sFileCont)
End Sub
- 手把手教你TestComplete_文件读写示例
- 手把手教你TestComplete_读键盘输入示例
- 手把手教你TestComplete_数据库操作函数示例
- 手把手教你TestComplete_自动化测试流程示例
- 手把手教你TestComplete_图文转换OCR示例一
- 手把手教你TestComplete_图文转换OCR示例二
- 手把手教你TestComplete_杂七杂八
- 手把手教你TestComplete_文件比对算法讨论
- 手把手教你TestComplete_验证码识别
- 手把手教你TestComplete_对象浏览功能
- 手把手教你TestComplete_配置嵌入脚本
- 手把手教你TestComplete_自动发邮件
- 手把手教你TestComplete_修改代理服务器
- 手把手教你TestComplete_暂时告一段落
- 手把手教你TestComplete_第一个脚本_notepad自动化测试示例
- 手把手教你TestComplete_怎么捕捉一个动态对象
- 手把手教你TestComplete_对象的等待问题
- 手把手教你TestComplete_调用标准dll实例
- 求mina高手帮我解决一个问题(各位mina大侠请进)
- 接触新的平台bf533
- Three20用TTURLRequest发送图片不成功
- C#中异步和多线程的区别
- 谷歌地图开发之入门
- 手把手教你TestComplete_文件读写示例
- 优秀,是一种生活态度
- 手把手教你TestComplete_读键盘输入示例
- 手把手教你TestComplete_自动化测试流程示例
- spring配置详解总结
- 在CentOS中安装easy_insatall
- POJ2187
- shell脚本打开IE快捷方式url文件
- Adobe TV上关于Flash和iOS的节目