次のコマンド
selenium.click("link=Identify Awards");
ポップアップを開きますが、テストは続行されません
私は配置しました
selenium.waitForPopUp(null, "1500");
selenium.windowFocus();
selenium.selectPopUp("Search -- Webpage Dialog");
役に立たないクリックコマンドの後、リンクはJava関数に移動します。
このコマンドがリンク、ボタン、チェックボックス、またはラジオボタンをクリックすることを知っています。クリックアクションによって新しいページが読み込まれる場合(リンクが通常行うように)、を呼び出します
waitForPageToLoad
。waitforPageToLoad
ポップアップの読み込みが登録されていないと思います
アップデート
私は以下を試しました
selenium.fireEvent("link=Identify Awards", "onClick");
そして、次のものを手に入れました
ポップアップが別のドメインにありますこれが原因である可能性がありますか?
Exception in thread "Main Thread" org.openqa.selenium.ie.UnexpectedJavascriptExecutionException: Cannot execute script
System info: os.name: 'Windows Vista', os.arch: 'x86', os.version: '6.1', java.version: '1.5.0_12'
Driver info: driver.version: ie
at org.openqa.selenium.ie.ErrorHandler.verifyErrorCode(ErrorHandler.java:70)
at org.openqa.selenium.ie.InternetExplorerDriver.executeScript(InternetExplorerDriver.java:205)
at org.openqa.selenium.internal.seleniumemulation.JavascriptLibrary.callEmbeddedSelenium(JavascriptLibrary.java:47)
at org.openqa.selenium.internal.seleniumemulation.FireEvent.handleSeleneseCommand(FireEvent.java:35)
at org.openqa.selenium.internal.seleniumemulation.FireEvent.handleSeleneseCommand(FireEvent.java:1)
at org.openqa.selenium.internal.seleniumemulation.SeleneseCommand.apply(SeleneseCommand.java:33)
at org.openqa.selenium.internal.seleniumemulation.Timer.run(Timer.java:47)
at org.openqa.selenium.WebDriverCommandProcessor.execute(WebDriverCommandProcessor.java:277)
at org.openqa.selenium.WebDriverCommandProcessor.doCommand(WebDriverCommandProcessor.java:209)
at com.thoughtworks.selenium.DefaultSelenium.fireEvent(DefaultSelenium.java:201)