simulateCapture() method is not working


#1

Hello,
I’m doing automation on a ios app, in this app during signup process auto capture option is appeared through JUMIO ( Jumio is an online mobile payment and identity verification company that provides card and ID scanning ).
I can successfully inject the image but the capturing does not happen. I attached a link of two videos , please go to the link to watch the video, so you can have clear view.

Image_injection

import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.IOSElement;
import io.appium.java_client.remote.MobileCapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.*;
import com.experitest.appium.SeeTestClient;
import java.net.URL;
import java.net.MalformedURLException;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;

public class CameraAction {
private String reportDirectory = “reports”;
private String reportFormat = “xml”;
private String testName = “Untitled”;
protected IOSDriver driver = null;
public static final String currentDir = System.getProperty(“user.dir”);

DesiredCapabilities dc = new DesiredCapabilities();
SeeTestClient client  ;


@BeforeMethod
public void setUp() throws MalformedURLException {
    dc.setCapability("reportDirectory", reportDirectory);
    dc.setCapability("reportFormat", reportFormat);
    dc.setCapability("testName", testName);
    dc.setCapability(MobileCapabilityType.UDID, "3270131798b12a77eae3f0752e2823de12dbdc85");
    dc.setCapability("instrumentApp", true);
    driver = new IOSDriver<>(new URL("http://localhost:4723/wd/hub"), dc);
    client = new SeeTestClient(driver);
  
    client.setProperty("Android.instrumentation.camera", "true");
    dc.setCapability("autoWebview", true);
    driver.setLogLevel(Level.INFO);
    
}

@Test
public void capture() throws Exception {
	
    
	
    client.simulateCapture("C:\\\\Users\\\\BS083\\\\image1.png"); // Inserted the image first
    driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);
    driver.context("NATIVE_APP");
    driver.findElementByXPath("//*[@text='Driver License']").click(); // after select the driveing license the camera will be open
    driver.context("NATIVE_APP_INSTRUMENTED");
	    driver.context("WEBVIEW_1");

}

@AfterMethod
public void tearDown() {
    
	System.out.println("done");
	//
}

}

I also like to inform you that, I installed my app in instrumented mode.

Appium Studio version: 11.9.75
Device: iphone 6s (ios 11.2.5)