私はselenium ide
を初めて使用しています。同じ値のクラスで2番目のhtmlタグを取得しようとしています。クラスとHTMLタグの位置を使用してXpathを特定する方法
<div class="test">
<div>
<small class="jo-date-time text-muted">Ordered on Jun 23, 2016 </small>
</div>
</div>
<div class="test">
<div>
<small class="jo-date-time text-muted">Ordered on Jun 22, 2016 </small>
</div>
</div>
class=jo-date-time[2] and //small[@class='jo-date-time'][2]
しかし、動作しません。それでも親のhtmlタグが必要です。それは本当にそれのようなものですか?
これは私のために働く。 - >//div[@class='test'][2]/div/small
私はまだ働いていませんが、私は(//小さな[@ class = 'jo-date-time text-muted'])[2]データが動的で変更される可能性があるためです。私はちょうど彼らが存在するかどうかを確認したい。 ところで、本当に()で封じ込められるのですか? –
@LovieT、詳細を提供しますか?どのようにそれを使用していますか?私が提供したのはテスト結果です – Rao