Access Webview element when getting only native context


I want to run some action elements that I can see with the UI Automator.

As you can see, the buttons are all on a webview. I’m using my S7 Edge with Android 7.0, Appium 1.7.1 and I did a full clean install.

The only thing I can access are the elements before the webview, otherwise it’s stuck on the Finding command

The only context that I get is Native context and I can force it to use a Webview context, otherwise it crash :
[debug] [AndroidDriver] Found webviews: []
[debug] [AndroidDriver] Available contexts: [“NATIVE_APP”]

The app is coded with Cordova and use the crosswalk plugin.

My class:

public class MyFirstTest {
AppiumDriver driver;
public void setupTest() {
    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability("platormName", "Android");
    capabilities.setCapability("deviceName", "9885b6514930495a35");
    capabilities.setCapability("app", "C:/APKs/myStart_2.0.7.apk");

URL serverAddress = null;
try {
    serverAddress = new URL("");
} catch (MalformedURLException e) {
driver = new AndroidDriver(serverAddress, capabilities);
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);


public void myTest() {

WebElement layout = driver.findElement(By.xpath("//android.widget.FrameLayout[contains(@resource-id,'android:id/content')]"));;

WebElement layout2 = driver.findElement(By.xpath("//android.widget.FrameLayout[@index='0']"));;

WebElement connect = driver.findElement(By.xpath("//android.widget.Button[@index='4']"));;

Any idea about how can I get out of it ?