标签:
${JsCode} | Get Element Attribute | XPATH=//table[@class=‘mnubar‘]//tr//td//span[text()=‘${MenuArr[0]}‘ and @class=‘mnuBtn‘]/parent::span/table[@class=‘mnuList‘]//tr/td[text()=‘${MenuArr[1]}‘]/parent::tr@action
注释:
1、MenuArr为传入的需要点击的按钮路径,如:新增/报价单
2、将对应按钮路径的@action属性的JS传给${JsCode},便于下面点击虚拟按钮时调用该JS动作。
3、action属性值:if (_iLocked<=0) {_lock();try{openAddWin(‘报价单);} catch(e){} finally{_unlock();}}
Execute Javascript | var button=window.document.getElementById(‘rfs_Button‘);if(button)window.document.body.removeChild(button);
Execute Javascript | var button=document.createElement(‘input‘);button.type=‘button‘;button.id=‘rfs_Button‘;button.value=‘RFS_Button‘;button.onclick=function(){${JsCode}};window.document.body.insertBefore(button, window.document.body.firstChild);
click button | rfs_Button
标签:
原文地址:http://www.cnblogs.com/BIGMOM/p/4303917.html