Web ページの特定のスロットが読み込まれているかどうかを確認する必要があります。main()
そのために関数でSelenium WebDriverを使用しています (JUnit テスト ケースを使用する必要がありますか?)。
<div>
特定の ID を持つテキスト間のテキストを取得する方法は何ですか?
このページが与えられた場合:
<div id="center-2" class="promo">
<div class="unified_widget rcmBody">
<span class="logo"><img src="someimage.gif" /></span>
<span class="headline">Make money by Selling items on Amazon</span>
<span class="link"><a href="/content/sell-on-amazon.htm">Selling On Amazon</a></span>
<span class="body">Sell your items on Amazon.com. Amazon can help you grow your business and reach more customers.</span>
<div class="h_rule"></div>
</div>
</div>
が<div id = center-2>
与えられたら、抽出する必要があります
「Amazon で商品を販売して収益を得る」、
「Amazon で販売する」、
「Amazon.com で商品を販売する。Amazon は、ビジネスの成長とより多くの顧客へのリーチを支援します。」
どの方法を使用すればよいですか?