<br>
    <br>
    To add new COT click on "Add New COT"
    <div class="stepandbutton">
        <div class="globalbuttoncell">
            <a class="buttonlink blockpage" onclick="javascript:addnewcot();" href="#">Add New COT</a>
        </div>
    </div>
    <input id="ComingFromForm" type="hidden" value="ComingFromForm" name="ComingFromForm">
    <input id="priorCOT" type="hidden" value="" name="priorCOT">
    <input id="rtncode" type="hidden" value="false" name="rtncode">
    <input id="refresh" type="hidden" value="NO" name="refresh">
    <input id="PDate" type="hidden" value="" name="PDate">
    <table>
        <thead>
            <tr>
                <th align="center"> *Trade Class</th>
                <th align="center">*Description</th>
                <th>Category </th>
                <th>Exclude from AMP</th>
                <th>Exclude from AMP 5i</th>
                <th>Exclude from ASP</th>
                <th>Exclude from BP</th>
                <th>Exclude from NFAMP </th>
                <th>Exclude from Texas </th>
            </tr>
        </thead>
        <tbody>
            <tr class="odd">
                <td align="center">
                    <input id="COT" class="data" type="text" value="" style="width:100px;" name="COT">
                </td>
                <td align="center">
                    <input id="Desc" class="data" type="text" value="" style="width:250px;" name="Desc">
                </td>
                <td align="center">
                    <select id="COTCategory" class="data small" name="COTCategory">
                </td>
                <td align="center">
                <td align="center">
                <td align="center">
                <td align="center">
                <td align="center">
                <td align="center">
            </tr>
        </tbody>
    </table>
</form>
<br>
<br>我只需要验证“”要添加新COT,请单击第三行中的"Add New COT“”。我已尝试使用// is包含(text(),“要添加新COT,请单击"Add new COT”)。但是它显示了定位器不是found.Please的错误,建议了另一种验证方法。
发布于 2015-11-24 00:27:01
这是丑陋的,但可以“工作”:
<tr>
    <td>verifyText</td>
    <td>//body</td>
    <td>*To add new COT click on "Add New COT"*</td>
</tr>但是正如上面的评论者提到的,你不想要br元素。您想要定位的是您没有提供的元素,该元素位于您附加的代码之上。那将是最好的。
https://stackoverflow.com/questions/33779124
复制相似问题