IAmNotCrazy
@IAmNotCrazy
Занимаюсь автоматизированным тестированием.

Чем заполнять DesiredCapabilities и IOSdriver для ios (simulator and real device)?

Так же будет хорошо, если поделитесь инфой, о том что желательно установить на mac, для комфортного автоматизированного тестирования api.

Я использую : eclipse + apppium + selenium

В данном куске кода я пытаюсь запустить приложение на эмуляторе:
static DesiredCapabilities caps;
    static IOSDriver<MobileElement> driver;
    public static void main(String[] args) {
            caps = new DesiredCapabilities();
            try {
            caps.setCapability("platformName", "IOs");
            caps.setCapability("platformVersion", "12.0");
            caps.setCapability("deviseName", "iPhone X");
            caps.setCapability("app", "/Users/7winds_build/Library/Developer/Xcode/DerivedData/In_Action-crbetcxeffidzvgruuixguhzykma/Build/Products/Debug-iphonesimulator/In Action.app");
            caps.setCapability("noReset", "true");
            }
            catch(Exception e) {
                System.out.println("Ошибка на этапе инициализации");
            }
            try {
                driver = new IOSDriver<> (new URL("http://0.0.0.0:4723/wd/hub"),caps);
                System.out.println("Отправка команд на сервер успешно");
            }
            catch(Exception e) {
                System.out.println("Помоги мне аллах");
            }

        }
    }

Код ошибки при компиляции:
Exception in thread "main" java.lang.NoSuchMethodError: org.openqa.selenium.json.JsonOutput.write(Ljava/lang/Object;)Lorg/openqa/selenium/json/JsonOutput;
    at io.appium.java_client.remote.NewAppiumSessionPayload.writeTo(NewAppiumSessionPayload.java:265)
    at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:175)
    at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:209)
    at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
    at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
    at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
    at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:38)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:84)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:94)
    at io.appium.java_client.ios.IOSDriver.<init>(IOSDriver.java:95)
    at Default.Test_simulator.main(Test_simulator.java:26)
    Suppressed: java.io.IOException: Incomplete document
        at com.google.gson.stream.JsonWriter.close(JsonWriter.java:559)
        at org.openqa.selenium.json.JsonOutput.close(JsonOutput.java:39)
        at io.appium.java_client.remote.NewAppiumSessionPayload.writeTo(NewAppiumSessionPayload.java:288)
  • Вопрос задан
  • 59 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы