zoukankan      html  css  js  c++  java
  • 点击含下拉菜单的列表/表单按钮:通过JS创建虚拟按钮并点击

    ${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

  • 相关阅读:
    springboot对JPA的支持
    Hibernate-什么是orm思想
    利用Struts拦截器完成文件上传功能
    Struts2的CRUD
    struts2的初步认识
    Maven搭建
    java虚拟机
    Map集合
    Set集合(TreeSet)
    Set集合的
  • 原文地址:https://www.cnblogs.com/BIGMOM/p/4303917.html
Copyright © 2011-2022 走看看