これは、私が(データテーブル)テーブルから値を収集するために、Salesforceのアプリケーションたくされ機能していないテーブルのXPathは、下記の私はテーブルからQE
値をこすりしたいHTMLコードSalesforceのアプリケーション -
<table class="slds-table forceRecordLayout slds-table--header-fixed slds-table--edit slds-table--bordered resizable-cols slds-table--resizable-cols uiVirtualDataTable" data-aura-rendered-by="519:0" data-aura-class="uiVirtualDataTable" style="width: 1256px;">
<thead data-aura-rendered-by="520:0">
<tfoot data-aura-rendered-by="523:0"></tfoot>
<tbody data-aura-rendered-by="524:0">
<tr>
<td class="slds-cell-edit slds-cell-edit slds-cell-error errorColumn cellContainer" tabindex="-1" data-aura-rendered-by="809:0">
<td class="slds-cell-edit cellContainer" tabindex="-1" data-aura-rendered-by="833:0">
<th class="slds-cell-edit cellContainer" scope="row" tabindex="-1" data-aura-class="forceInlineEditCell" data-aura-rendered-by="850:0">
<span class="slds-grid slds-grid--align-spread forceInlineEditCell" data-aura-rendered-by="866:0" data-aura-class="forceInlineEditCell">
<a class="slds-truncate outputLookupLink slds-truncate forceOutputLookup" data-refid="recordId" data-recordid="a2F46000000Y3s0EAC"
data-special-link="true" href="#/sObject/a2F46000000Y3s0EAC/view" target="_blank" rel="noreferrer" title="QE"
data-aura-rendered-by="860:0" data-aura-class="forceOutputLookup">QE</a>
<span class="triggerContainer" data-aura-rendered-by="868:0">
</span>
</th>
</tr>
</tbody>
</table>
ですそれは最初の行にあります。以下は
は私のXPathです:driver.findElement(By.xpath("//table[@class='slds-table forceRecordLayout slds-table--header-fixed slds-table--edit slds-table--bordered\n" +
" resizable-cols slds-table--resizable-cols uiVirtualDataTable']/tbody/tr/th/span")).getText();
このXPathをフレームにテーブルのクラス名を使用して、私はUnable to locate element
エラーの説明取得しています:
no such element: Unable to locate element: {"method":"xpath","selector":"//table[@class='slds-table forceRecordLayout slds-table--header-fixed slds-table--edit slds-table--bordered
resizable-cols slds-table--resizable-cols uiVirtualDataTable']/tbody/tr/th/span"}
(Session info: chrome=61.0.3163.100)
(Driver info: chromedriver=2.29.461591 (62ebf098771772160f391d75e589dc567915b233),platform=Windows NT 6.1.7601 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 300.01 seconds
注:私は実行するとFirePathの私のxpath、その発見が正しく、しかし見つからない実行中に
あなたは完全なエラースタックトレースとの質問を更新することはできますか? – DebanjanB
@DebanjanB:私の質問に追加 – Prabu