0
私は、Webとネイティブビューを常に切り替えているハイブリッドアプリケーションを自動化しようとしています。Appium - コンテキストの既存のクロムドライバを検出しました。それを使用する
私が使用している機能ここ
public void switchToWebContext() throws InterruptedException {
Set<String> contextNames = appiumDriver.getContextHandles();
for (String context : contextNames) {
System.out.println("Context is" + context);
if (context.contains("WEBVIEW")) {
getAppiumWebDriver().context(context);
displayLog("Mobile Web View switched");
}
}
}
public void switchToNativeContext() {
Set<String> contextNames = getAppiumWebDriver().getContextHandles();
for (String context : contextNames) {
if (context.contains("NATIVE")) {
displayLog("Native View found");
getAppiumWebDriver().context(context);
}
}
}
私の問題は、初めてのナビゲーションが正常に流れかかりますが、私は待った後、第二のターンに、私はこのエラー
Found existing chromedriver for context
を得るということですされています数分の間、私が得るエラーは
[debug] [JSONWP Proxy] Proxying [GET /url] to [GET http://127.0.0.1:8000/wd/hub/session/ad84071a45fc33c30541cc85681dab7b/url] with no body
[debug] [AndroidDriver] ChromeDriver is not associated with a window. Re-initializing the session.
[Chromedriver] Restarting chromedriver
[debug] [Chromedriver] Changed state to 'restarting'
[debug] [JSONWP Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8000/wd/hub/session/ad84071a45fc33c30541cc85681dab7b] with no body
私に助けてくれますか?私はあなたがWEB_VEIWとNATIVEの間で切り替える必要がないWindows 10