[ Last edited by QA_BAY on 2004-11-18 at 20:40 ]作者: 生如火花 时间: 2004-11-18 16:08
是!.*,在TSL语句中不能用,用于GUI对象作者: shyfish 时间: 2004-11-19 13:23
!.*在GUI里面也会报错的吧?必须在!.*后面或者在!和.*之间加一些参照的符号
如果要找任意的非空字符串,用这个:!..*(直接使用,不必再加其它相对的参照字符),在WR自带的例子里面发现的,能够匹配任意的字符串(非空)
还有一种使用方法:!.*g.*,即只要字符串中含有g字母就匹配
其实不用这么费力去研究,WR的Run Wizard会自动帮忙修改的作者: QA_BAY 时间: 2004-11-19 13:31
是阿,Run Wizard会帮你改,
如果你认错时他就不会了,(当你不太肯定是哪个控件时)
需要你自己去改!
你上面说的那几种都很好
只是没有多加注意!
As I know, sometimes the obj's physical description changed as well, such as "{
class: window,
MSW_class: browser_main_window,
NSTitle: "Browser Main Window"
}" change to "{
class: window,
MSW_class: browser_main_window,
NSTitle: "Browser Main Window",
location: 0
}"
If this happen, "!.*" will not work. Currently I added switch/if/... in my scripts, but don't think is a good solution.
Actually if there are more than one window. Winrunner will show object description in above format adding extra parameter "location".
To resolve this issue...if you know that which(No.) window you are trying to interact then for physical description you can use that respective no. then it will work fine.
If you think it is not possible to know the no. of IE browsers open then you can use "getparent" function for getting the actual parent window and carry on your testing irrespective of any no. of windows
相信这里些话已经说得很清楚了!
[ Last edited by QA_BAY on 2004-11-19 at 14:04 ]作者: steven0607 时间: 2005-5-25 17:27
Originally posted by 生如火花 at 2004-11-18 16:08:
是!.*,在TSL语句中不能用,用于GUI对象