私は、Selenium 2を使用してフレームベースのWebアプリケーションをテストしています。これはユーザーにログインしようとする単純なコードで、ページの:私はタイプFirefoxDriver
のWebDriver
、InternetExplorerDriver
またはHtmlUnitDriver
に送信する場合Selenium 2を使用してOperaでフレームベースのWebアプリケーションをテストする
driver.get("http://localhost/index.pl");
driver.findElement(By.name("session_username")).sendKeys("my_username");
driver.findElement(By.name("session_password")).sendKeys("my_password");
driver.findElement(By.xpath("//input[@value='log in']")).click();
driver.switchTo().frame("qabody_r_head");
これが正常に動作します。しかし、ドライバのタイプがOperaDriver
の場合、次のエラー出力で例外が発生します。
Exception in thread "main" org.openqa.selenium.NoSuchFrameException: Invalid frame name qabody_r_head
Build info: version: '2.15.0', revision: '15105', time: '2011-12-08 09:57:28'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_02'
Driver info: driver.version: unknown
at com.opera.core.systems.scope.services.ums.EcmaScriptDebugger.changeRuntime(EcmaScriptDebugger.java:431)
at com.opera.core.systems.OperaDriver$OperaTargetLocator.frame(OperaDriver.java:772)
at SeleniumTest.testLogin(SeleniumTest.java:26)
at SeleniumTest.main(SeleniumTest.java:59)
私は何か間違ったことをしていますか、またはOperaDriverがフレームで動作していませんか?