2015-01-09 2 views
2

웹 사이트의 데이터를 확인해야하는 Android 프로젝트에서 WebView으로 작업하고 있습니다. WebView에서 URL 링크를 가져 오는 방법이 있습니까? 내 WebView은 숨겨진 주소창을 표시하지 않습니다.Appium : webview에서 URL을 가져 오는 방법

내가

Set<String> contextNames = driver.getContextHandles(); 
     for (String contextName : contextNames) { 
      System.out.println(contextNames); 
     } 
     driver.context((String) contextNames.toArray()[1]); 
     driver.context("WEBVIEW"); 
     driver.getcurrentURL(); 
    } 
+0

몇 가지 코드를 게시하시기 바랍니다 시도해보십시오 시도, 그것은 쉽게 정확히 무엇을하고 있는지 이해할 수 있도록한다. – Andry

답변

-1

WebView webView; 
webView.getUrl(); // Shows the url which is currently loaded in webview 
Log.d("URL", url); // To show the url which has loaded into the webview in LogCat. 
관련 문제