0
<table id="RegTable" class="GSTable" cellspacing="0" cellpadding="0" style="margin: 20px auto 0px; width: 580px; padding: 5px; font-size: 12px;">
<tbody>
<tr>
<td id="termstab" height="150" colspan="2">
<div style="width:100%; height:100%; padding-right:5px; overflow-y:auto;">
<p align="justify"></p>
<h2 class="paraHead" align="center">Terms and Conditions</h2>

この Web ページの「利用規約」のテキストを確認するにはどうすればよいですか。私はverifyTextPresentメソッドと他の可能なメソッドを試しましたが、うまくいきません。だから私はパスを見つける必要があります。その場所から「利用規約」というテキストを取得するにはどうすればよいですか。

4

1 に答える 1

0

色々な方法...

XPath経由では次のようになります。

//h2[text()='Terms and Conditions']

また

//h2[@class='paraHead']

また

//table[@id='RegTable']/descendant::h2[text()='Terms and Conditions']

またはCSSを使用:

h2.parahead
于 2013-04-18T09:44:33.937 に答える