自动化测试工具无法读取PB的sle.text,解决方案
来源:互联网 发布:重生之网络巨头txt下载 编辑:程序博客网 时间:2024/05/21 14:50
用WinRunner、Rational Rotot等自动化测试工具测试PB程序,会发现无法读取文本框的值,因为PB的控件不是标准的Windows控件。下文给出了一个解决方案
作者:J. Timothy Stewart
Apparently, PowerBuilder's StaticText boxes do not follow the MS standards for static text in that they do not update their text captions correctly. If you call a WinAPI GetWindowText funtion with the handle to
a PB static text box, the API will return the text caption placed in that control at design time. It will NOT ever return the value of that field at runtime if it were to change after development (i.e. status
bar). This creates a problem for automated testing tools such as SQA TeamTest and QA Partner which rely on the WinAPI to retreive these values from those controls.
Our final resolution to this problem is that we used StaticText controls to display the information (instead of SLEs) and we created a global function called F_SETTEXT() which is called whenever the text caption in a static control changes.
void function F_SETTEXT( staticbox control, string stext)
control.text = stext
SetWindowText(handle(control),sText)
return
This will ensure that other applications can "read" the text in the caption as it uses the WinAPI call to set the text as well as the PB assignment method. This solution works for us.
- 自动化测试工具无法读取PB的sle.text,解决方案
- Badboy自动化测试工具 读取Excel
- 自动化测试工具的原理
- 自动化测试工具的原理
- 自动化测试工具的特点
- 自动化测试工具的原理
- 自动化测试的工具学习
- pb单行文本输入框sle技巧
- 测试工具与自动化测试的展望
- sle
- 实施自动化功能测试的解决方案
- 实施自动化功能测试的解决方案
- 自动化测试解决方案之框架的选择
- Android自动化测试解决方案
- Android自动化测试解决方案
- Android自动化测试解决方案
- 自动化测试解决方案
- Android自动化测试解决方案
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(71):l1_data_sram_init的疑惑
- NetBeans中设置@author
- JSF自定义组件之六 总结
- UBUNTU 8软件源
- SenseLock开发手记(三)
- 自动化测试工具无法读取PB的sle.text,解决方案
- Unity Application Block--通过配置文件读取映射
- 使用hibernate实现树形结构无限级分类
- 智能客户端(SmartClient)
- 中石化ERP建设/外挂专业设备管理系统
- 怎样将.Net程序部署到没有安装.Net Framwork的机器上?
- 南京扬子石化大型设备管理系统
- PHP面向对象学习的笔记
- C#程序编码规范