【问题标题】:Xpath for button within a table with no html id没有 html id 的表中按钮的 Xpath
【发布时间】:2021-07-05 18:19:01
【问题描述】:

正在寻找附加代码的 xpath。这是表格的代码sn-p

<table id="ManualPageButtonRowTop" cellspacing="0" cellpadding="2" width="100%" role="presentation">
    <tbody><tr>
        <td width="40%">
            &nbsp;
        </td>

        <td width="20%" align="center">
            <input type="button" value="Save" class="ButtonReq" tabindex="120" onclick="saveManualPage(); this.style.display = 'none'; showElementById('ButtonWithPleaseWait_MessageId_128'); setTimeout(function() { Dom.addClass('ButtonWithPleaseWait_MessageId_128', 'AjaxLoadingMessage') }, 100)"><span style="padding:4px; display:none" id="ButtonWithPleaseWait_MessageId_128">Processing request. Please wait...</span>
        </td>

        <td>
            &nbsp;
        </td>
    </tr>

【问题讨论】:

标签: html xpath dynamic


【解决方案1】:

您可以尝试使用属性类或值,例如:

//table//input[@type='button'][@value='Save'][@class='ButtonReq']

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-10-02
    • 2012-08-11
    • 1970-01-01
    • 2017-12-31
    • 1970-01-01
    • 1970-01-01
    • 2021-08-01
    • 2013-01-24
    相关资源
    最近更新 更多