【发布时间】:2015-05-17 21:26:34
【问题描述】:
我想在该字段中输入如下日期:2015/05/05。这个想法是使用 ends-with 命令。到目前为止,以下内容不起作用
//input[ends-with(@id,'_ExecutionDate')and contains(.,'ExecutionDate')][@class='emphasis']
//div[ends-with(@id,'_ExecutionDate')and contains(.,'ExecutionDate')][@class='emphasis']
这是来自 Selenium 的 Select 选项的 XPATH: xpath=(//输入[@id='44d02654-39b3-447e-904d-8d3c7ca016b6.ExecutionDate'])[3]
她是来自 Firebug 的 xpath:
.//*[@id='44d02654-39b3-447e-904d-8d3c7ca016b6.ExecutionDate']
这是一个代码:
<div class="pull-right" data-bind="visible: view.isIndividual"><!-- ko foreach: signingParties -->
<a id="44d02654-39b3-447e-904d-8d3c7ca016b6.ExecutionDate" class="emphasis" style="margin-right:5px" data-bind="visible: !$root.locked(), click: $root.transferOfLand.view.editExecutionDates, valName: 'ExecutionDate', text: view.executionDateDisplay()" href="#" name="44d02654-39b3-447e-904d-8d3c7ca016b6.ExecutionDate" data-val="LandTransferDocument.Transferor.0.SigningParty.ExecutionDate">Add Execution Date...</a>
<span id="44d02654-39b3-447e-904d-8d3c7ca016b6.ExecutionDate" style="margin-right: 5px; display: none;" data-bind="visible: $root.locked(), valName: 'ExecutionDate', text: view.executionDateDisplayReadOnly()" name="44d02654-39b3-447e-904d-8d3c7ca016b6.ExecutionDate" data-val="LandTransferDocument.Transferor.0.SigningParty.ExecutionDate">No Execution Date</span>
【问题讨论】:
标签: selenium xpath selenium-ide