I am **using same environment** as you described and working fine. Dinesh give a try: Set<String> contextNames = ad.getContextHandles(); System.out.println("Context Names:"+contextNames.toString()); String lastestContextView = (String) contextNames.toArray()[contextNames.size()-1]; if (lastestContextView.contains("WEBVIEW_")) { ad.context(lastestContextView); System.out.println("Latest Context Name"+lastestContextView); } Thread.sleep(5000); ad.context("NATIVE_APP");