51Testing软件测试论坛

标题: 回放时报错 [打印本页]

作者: wsryyffs    时间: 2006-10-31 14:59
标题: 回放时报错
一段脚本,运行到脚本的第4行时报错,multi_bs_def_cell_id_t_666666_24826中的24826每次都变。
Window SetContext, "Caption=http://172.20.24.5:9080/bill/billing/baseinfo/feeparam/basegroup/cell_group_multiInsert.jsp?met - Microsoft Internet Explorer", ""
    Browser NewPage,"",""
    CheckBox Click, "Name=multi_bs_def_cell_id_t_666666_24826"

我曾经试过CheckBox Click, "HTMLText=666666_1",不好用

用inspector抓取出的结果
CheckBox,Name=multi_bs_def_cell_id_t_666666_24947
        Contents
        HTML Text
        Filtered Contents
        Properties
                id =
                tagName = INPUT
                title =
                language =
                sourceIndex = 82
                lang =
                offsetLeft = 3
                offsetTop = 1
                offsetWidth = 125
                offsetHeight = 20
                innerHTML =
                innerText =
                outerHTML = <INPUT type=checkbox value=666666_1 name=multi_bs_def_cell_id_t_666666_24947>
                outerText =
                isTextEdit = False
                scopeName = HTML
                currentStyle = Object
                        Property was not expanded
                tabIndex = 0
                accessKey =
                clientHeight = 20
                clientWidth = 125
                clientTop = 0
                clientLeft = 0
                readyState = complete
                dir =
                scrollHeight = 20
                scrollWidth = 125
                scrollTop = 0
                scrollLeft = 0
                canHaveChildren = False
                tagUrn =
                readyStateValue = 4
                isMultiLine = False
                canHaveHTML = False
                inflateBlock = False
                contentEditable = inherit
                isContentEditable = False
                hideFocus = False
                disabled = False
                isDisabled = False
                glyphMode = 0
                uniqueNumber = 2
                uniqueID = ms__id2
                nodeType = 1
                nodeName = INPUT
                dataFld =
                dataSrc =
                dataFormatAs =
                type = checkbox
                value = 666666_1
                name = multi_bs_def_cell_id_t_666666_24947
                status = False
                size = 20
                maxLength = 2147483647
                defaultValue = 666666_1
                readOnly = False
                indeterminate = False
                defaultChecked = False
                checked = False
                border =
                vspace = 0
                hspace = 0
                alt =
                src =
                lowsrc =
                vrml =
                dynsrc =
                complete = False
                loop = 1
                align =
                width = 0
                height = 71165860
                Start = fileopen
                accept =
                useMap =


HTML Text属性中的值为<INPUT type=checkbox value=666666_1 name=multi_bs_def_cell_id_t_666666_24947>
作者: 5am    时间: 2006-10-31 15:16
CheckBox Click, "Name={multi_bs_def_cell_id_t_666666*}"
试试~
作者: wsryyffs    时间: 2006-10-31 15:23
修改成CheckBox Click, "Name={multi_bs_def_cell_id_t_666666*}"还是报错。
我修改成CheckBox Click, "VisualText=666666_1",回放时不报错,但回放时没有选中该CheckBox
作者: 5am    时间: 2006-10-31 16:55
是不是这个页面中还有其他VisualText=666666_1的?
作者: wsryyffs    时间: 2006-11-1 07:44
解决了,'CheckBox Click, "Index=1"
作者: dionysus    时间: 2006-11-1 09:48
原帖由 wsryyffs 于 2006-11-1 07:44 发表
解决了,'CheckBox Click, "Index=1"


记得robot可以使用不同的属性来定位一个object,但是在你抓的属性中没有看到index啊
作者: wsryyffs    时间: 2006-11-1 13:19
抓的属性确实没有index,只是我的同事突然来灵感,一试果然好用,呵呵




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2