|
如图,执行 selenium.click("id=ext-gen49");后就报错了(点击添加按钮),报错后手动点击“确定”或“取消”代码都无法继续执行下去。我已经试过不用selenium回放,直接用IE打开,页面是正常的。
这个问题困扰了我很久了,麻烦大家帮帮忙,以下是页面代码:
var dbsx_grid = new Ext.grid.GridPanel({
store : dbsx_gridstore,
autoHeight : true,
stripeRows : true,
autoExpandColumn : 'DBSX_ID',
id:'dbsxgrid',
columnLines : true,
enableHdMenu : false ,
viewConfig : {
forceFit : true
},
loadMask : {
msg : prompts.load
},
cls : 'grid',
columns : [new Ext.ux.RowNumberer(), {
header : "标题",
dataIndex : 'TSBT',renderer:renderToolTip,width:150
},{
header : "发布人",
dataIndex : 'DJRMC'
},{
header : "接收单位",
dataIndex : 'FKRMC',width:150,renderer:renderToolTip
},{
header : "签收人",
dataIndex : 'QSR'
},{
header : "发布时间",
dataIndex : 'TSSJ',
renderer:renderRQ
}, {
header : "签收状态",
dataIndex : 'FKZTMC'
},{
header : "签收状态dm",
dataIndex : 'FKZT',
hidden:true
},{
header:'主键',
dataIndex:'DBSX_ID',
hidden:true,
id:'DBSX_ID'
},{
header:'主键2',
dataIndex:'SYDBSX_ID',
hidden:true,
id:'SYDBSX_ID'
}],
tbar : [{
text : '添加',
cls : 'btn',
id:'dbsxadd',
iconCls : 'icon-add',
handler : function() {
/*
flag='add';
var date = GetCurrentTime();
Ext.getCmp('starttssj').setValue(date);
add_form_title = '工作提示发布';
if(zw=='03'){
compleTree1.root.id = '32'
}else{
compleTree1.root.id = dwdm;
}
compleTree1.getLoader().load(compleTree1.root,function(){
compleTree1.getRootNode().expand(false,true);
},this);
showWindowDbsx(this);
*/
if(Ext.isIE6){
window.showModalDialog("addDbsx.jsp","newWin","dialogWidth:897px;dialogHeight:330px;minimize:yes;maximize:yes;");
}else if (Ext.isIE8){
window.showModalDialog("addDbsx.jsp","newWin","dialogWidth:890px;dialogHeight:285px;minimize:yes;maximize:yes;");
}else{
window.showModalDialog("addDbsx.jsp","newWin","dialogWidth:890px;dialogHeight:285px;minimize:yes;maximize:yes;");
}
ViewDbsxDWR.getTotal(dbsx_entity, function(para) {
dbsx_pageToolbar.setTotal(para);
});
}
},{
text : '删除',
cls : 'btn',
id:'dbsxdelete',
iconCls : 'icon-delete',
handler : function(){
if (dbsx_grid.getSelectionModel().getSelected()) {
Ext.Msg.confirm('删除确认提示','是否删除该项记录,删除后不可恢复!',function(btn,text){
if(btn == 'yes'){
del_entity = {
DBSX_ID : dbsx_grid.getSelectionModel().getSelected().data.DBSX_ID
};
DbsxDWR.deleteDbsx(del_entity,function(para){
if(para.state==1){
ViewDbsxDWR.getTotal(dbsx_entity, function(para) {
dbsx_pageToolbar.setTotal(para);
});
Ext.exception.msg(para.message, true ,0,1,20,10);
}else if(para.state==0){
Ext.exception.msg(para.message, para.exceptionMsg,2,10,20,10);
}
});
del_entity.DBSX_ID = dbsx_grid.getSelectionModel().getSelected().data.SYDBSX_ID;
ShouyDbsxDWR.deleteShouyDbsx(del_entity,function(para){});
}else{
}
});
} else {
Ext.Msg.alert('提示', '请选择要删除的信息');
}
}
},{
text : '详情',
cls : 'btn',
id:'xiangq',
iconCls : 'icon-view',
handler : function(){
if (dbsx_grid.getSelectionModel().getSelected()) {
/*
showWindowDbsxDetail(this);
sp_entity = {
DBSX_ID : dbsx_grid.getSelectionModel().getSelected().data.SYDBSX_ID
};
sp_entity = {
DBSX_ID : dbsx_grid.getSelectionModel().getSelected().data.DBSX_ID
};
ViewDbsxDWR.selectViewDbsx(sp_entity, function(para) {
for (var k in para) {
if (k == "99") {
Ext.exception.msg("查询信息时发生异常", para[k], 2,10,20,10);
}
}
dbsxdetail_form.getForm().setValues(para);
});
*/
var dbsxid=dbsx_grid.getSelectionModel().getSelected().data.DBSX_ID;
window.showModalDialog("DetailDbsx.jsp?DBSX_ID="+dbsxid+"&fkzt=1&title=工作提示发布详情","newWin","dialogWidth:800px;dialogHeight:300px;minimize:yes;maximize:yes;");
} else {
Ext.Msg.alert('提示', '请选择要查看的信息');
}
}
}],
bbar : dbsx_pageToolbar,
listeners : {
'rowdblclick' :function(btn, e) {
if (dbsx_grid.getSelectionModel().getSelected()) {
/*
showWindowDbsxDetail(this);
sp_entity = {
DBSX_ID : dbsx_grid.getSelectionModel().getSelected().data.SYDBSX_ID
};
sp_entity = {
DBSX_ID : dbsx_grid.getSelectionModel().getSelected().data.DBSX_ID
};
ViewDbsxDWR.selectViewDbsx(sp_entity, function(para) {
for (var k in para) {
if (k == "99") {
Ext.exception.msg("查询信息时发生异常", para[k], 2,10,20,10);
}
}
dbsxdetail_form.getForm().setValues(para);
});
*/
var dbsxid=dbsx_grid.getSelectionModel().getSelected().data.DBSX_ID;
window.showModalDialog("DetailDbsx.jsp?DBSX_ID="+dbsxid+"&fkzt=1&title=工作提示发布详情","newWin","dialogWidth:800px;dialogHeight:300px;minimize:yes;maximize:yes;");
} else {
Ext.Msg.alert('提示', '请选择要查看的信息');
}
},
'click' : function(btn,e){
if (dbsx_grid.getSelectionModel().getSelected()) {
if(zhangh!=dbsx_grid.getSelectionModel().getSelected().data.DJR){
Ext.getCmp('dbsxdelete').setDisabled(true);
}else{
Ext.getCmp('dbsxdelete').setDisabled(false);
}
}
}
}
}); |
|