Эта проблема возникла после первых шагов.
ОС: Mac
Я объявил DesiredCapabilities
и пытаюсь запустить симулятор IPhone с помощью Xcode.
public class DC_Demo{
public static void main (String[] args) throws MalformedURLException {
DesiredCapabilities des = new DesiredCapabilities();
des.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone X");
des.setCapability(MobileCapabilityType.PLATFORM_NAME, "IOS");
des.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.IOS_XCUI_TEST);
des.setCapability(MobileCapabilityType.APP, "//Macintosh HD//Users//isururodrigo//Development//VS-Staging.app");
IOSDriver<IOSElement> driver = new IOSDriver<>(new URL("http://127.0.0.1:4723/wd/hub"),des);
}
}
Ошибка:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Function
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at DC_Demo_VisitSinga.main(DC_Demo_VisitSinga.java:21)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function