watir-webdriver を使用していますが、確認ポップアップで問題が発生しています。「Sell」ボタンをクリックすると、確認のポップアップが表示されます。ポップアップで「OK」をクリックする手順を考え出す方法がわかりません。どんな助けでも大歓迎です。
問題の html は次のとおりです: (ボタン)
<button>class="btn primary" onclick="return confirm('Are you sure you wish to sell the selected loan parts?');" value="Sell Loan Parts" name="sell_loan_parts" style="" type="submit"</button>
次の手順を使用してみましたが、これは間違っていると思います。
@browser.button(:onclick, "return confirm('Are you sure you wish to sell the selected loan parts?');").click
表示されるエラー メッセージは次のとおりです。
Modal dialog present (Selenium::WebDriver::Error::UnhandledAlertError)
[remote server] file:///var/folders/fd/hjkxr06j6gs6620tl4k_9fh00000gn/T/webdriver-profile20121129-50930-ul24fl/extensions/fxdriver@googlecode.com/components/command_processor.js:10402:in `unknown'