누군가 내가 잘못하고있는 것을 정확하게 지적 할 수 있는지 궁금합니다. Android WebDriver를 사용하여 iframe에 액세스하려고합니다. 홈 페이지의 로그인 링크를 클릭하면 iframe이 열립니다. 아래는 내가 switchTo을 내가 iframe이가 열립니다까지, 프레임 ID가 존재하는지 확인 기다릴Android WebDriver를 사용하여 IFrame으로 전환 할 수 없습니다.
<div class="dialog" style="background-color: rgb(232, 235, 238); color: rgb(51, 51, 51);">
<iframe id="registration-dialog-frame" scrolling="no" frameborder="0" src="http://test.com" border="0" allowtransparency="true" style="width: 235px;">
<html>
</iframe>
<span id="signin-cancel" class="cancelButton">Cancel</span>
을 만들어 액세스하고 사용하는 것을 시도하고있다 iframe이 ID를 가지고있는 SRC 코드 중 일부이다() 나는 할 때 나는
org.openqa.selenium.WebDriverException: Error: {"message":"Cannot read property 'document' of undefined"}
를 얻을이
driver.switchTo().frame("registration-dialog-frame");
처럼 그 iframe을로 전환 이
driver.switchTo().frame(driver.findElement(By.id("registration-dialog-frame")));
내가 얻을
org.openqa.selenium.WebDriverException: java.util.ArrayList cannot be cast to org.openqa.selenium.android.library.DomWindow
이것은 안드로이드 WebDriver 것입니까? iframe으로 전환 할 때 다른 유사한 오류가 발생 했습니까? 아무도 내가 이것을 어떻게 할 수 있는지 안다?