Error is showing while try to use instrumentApp


#1

here is my code and the screenshot of the error is attached. Please tell me what is the problem in @beforemethod.

package meed.meed;

import io.appium.java_client.remote.IOSMobileCapabilityType;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.IOSElement;
import io.appium.java_client.remote.MobileCapabilityType;
import junit.framework.Assert;

import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.;
import org.junit.Assert.
;
import com.experitest.appium.SeeTestClient;
import org.testng.annotations.*;

import java.net.URL;
import java.net.MalformedURLException;
import java.util.logging.Level;

public class signupNEW {
private String reportDirectory = “reports”;
private String reportFormat = “xml”;
private String testName = “Untitled”;
protected IOSDriver driver = null;

DesiredCapabilities dc = new DesiredCapabilities();
SeeTestClient client = new SeeTestClient(driver);

@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(MobileCapabilityType.APP, "C:\\Users\\BS083\\AppData\\Roaming\\appiumstudio\\original-apks\\meed.ipa");
    dc.setCapability(IOSMobileCapabilityType.BUNDLE_ID, "net.meed.meedapp");
    dc.setCapability("instrumentApp", true);
    driver = new IOSDriver<>(new URL("http://localhost:4723/wd/hub"), dc);
    client.setProperty("IOS.instrumentation.camera", "true");
    driver.setLogLevel(Level.INFO);
    
}

@Test
public void join() throws Exception {
	
	String inputfield= "//*[@nodeName='INPUT']";
	driver.findElement(By.xpath(inputfield)).sendKeys(new String[] { "text2" });
    camera(client);
}

public void camera (SeeTestClient client) throws Exception {
	
	client.simulateCapture("C:\\Users\\BS083\\work\\code\\meed\\src\\test\\resources\\image1.png");
}





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

}