1
resposta

Erro ao executar app.main

Ao rodar o código que o instrutor passa, dá erro.

O erro exibido é:

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Original error: Unsupported or unrecognized SSL message Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'STEFANE-NOTIBRU', ip: '192.168.15.3', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '16.0.1'

Segue código abaixo:

package com.alura.appium;


import io.appium.java_client.AppiumDriver;
import io.appium.java_client.remote.MobileCapabilityType;
import io.appium.java_client.remote.MobilePlatform;
import org.openqa.selenium.remote.DesiredCapabilities;

import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;

public class App
{
    public static void main( String[] args ) throws MalformedURLException {


        File apk = new File("C:\\Users\\Stefane\\IdeaProjects\\AluraAppium\\src\\main\\resources\\alura_esporte.apk");
        DesiredCapabilities configuracoes = new DesiredCapabilities();
        configuracoes.setCapability(MobileCapabilityType.APP, apk.getAbsolutePath());
        configuracoes.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.ANDROID);
        configuracoes.setCapability(MobileCapabilityType.AUTOMATION_NAME, "UiAutomator2");

        URL urlConexao = new URL("https://127.0.0.1:4723/wd/hub");
        AppiumDriver driver = new AppiumDriver<>(urlConexao, configuracoes);
    }
}
1 resposta

Estou com o mesmo problema. Alguém pode ajudar?