qtp description对于我要找的javawindow总是时灵时不灵的?
function getwindowByTitle(title)set win = description.create()
win("class description").value = "window"
win("title").value = title
set getwindowByTitle = title
end function对于开始的登陆界面,它使用,单当它进入主界面是就不能对 title 进行识别了
javawindow(getwindowByTitle("登录")).javabutton(“登录”).click
wait(10)
javawindow(getwindowByTitle("xxxxxxxx")).xxx,------------------》》这个就总是说底下没有对应的属性,让我检查是不是有这个对象 新手,完全看不懂代码,只会做功能测试~~~~~~~ 定位不正确呗 你这没写错?
function getwindowByTitle(title)
set win = description.create()
win("class description").value = "window"
win("title").value = title
// set getwindowByTitle = title
set getwindowByTitle=win
end function 1231 function getwindowByTitle(title)
set win = description.create()
win("class description").value = "window"
win("title").value = title
set getwindowByTitle = title
end function
你这个不对吧。
set getwindowByTitle = win 才对。
至于除开登录页面,都无法获取到对象的话,你得确定下,其他对象是不是都能通过win("class description").value = "window"
win("title").value = title 这几个属性唯一获取了。
页:
[1]