ios – java.lang.AssertionError: getIOSDriver(): Exception occurred instantiating IOSDriver (Running Synergy server)

[ad_1]

openjdk version "13.0.10" 2022-01-18
OpenJDK Runtime Environment Zulu13.46+15-CA (build 13.0.10+5-MTS)
OpenJDK 64-Bit Server VM Zulu13.46+15-CA (build 13.0.10+5-MTS, mixed mode, sharing)
Synergy server jar v.3.0.17
npm v.8.5.0
node v.16.14.2

I want to run automated tests on my real device (iPhone SE, OS: 14.6 [cannot update OS]). I run WebDriverAgentRunner on my device in Xcode (v.13.3), testing starts on my real device:


/**
 Never ending test used to start WebDriverAgent
 */
- (void)testRunner
{
  FBWebServer *webServer = [[FBWebServer alloc] init];
  webServer.delegate = self;
  [webServer startServing];
}

Running Synergy server (session on http://localhost:7777).
Added synergy server url to my driver.properties file:

SYNERGY.URL=http://localhost:7777
DEVICE.CATEGORY=Phone
DEVICE.ID=device-id--
APP.PATH=https:path--

But when I run testng.xml file in IntelliJ, I get an error on methodSetup method which is:

@BeforeMethod(alwaysRun = true)
    @Parameters({"Environment"})
    public void methodSetup(String env, Method method) {

        IOSSynergyMobileDriver.getInstance().setScreenOrientation(screenOrientation);

        DeviceCapabilities capabilities =
                IOSSynergyMobileDefinition.getIOSCommonDesiredCapabilities(
                        DriverProperties.getInstance().getDeviceId(),
                        DriverProperties.getInstance().getAppBinaryPath(),
                        DriverProperties.getInstance().getAppId(),
                        DriverProperties.getInstance().getVerifyNetworkConnectivity());

        capabilities.addCapability("AppLaunchArguments",
                RestrictionFactory
                        .getInstance(
                                this.getTestGroup()
                        )
                        .getAppLaunchArgs()
                        .toString()
        );

        IOSSynergyMobileDriver.getInstance().getIOSDriver(
                DriverProperties.getInstance().getSynergyUrl(),
                capabilities);

        initTestSteps();
    }

And the error is:

java.lang.AssertionError: getIOSDriver(): Exception occurred instantiating IOSDriver. Exception: com.synergy.core.exceptions.SessionNotStartedException: [{“results”:”Session 278b848c-442c-4806-a789-25f2e68f8588 failed to start with error: Unable to find ios_webkit_debug_proxy on your path! Is it installed and available? See the Synergy Server README for details but it can easily be installed via ‘brew install –HEAD ios-webkit-debug-proxy’ on MAC.”},{“results”:”Session 278b848c-442c-4806-a789-25f2e68f8588 failed to start with error: Unable to find libimobiledevice packages on your path! Is it installed and available? See the Synergy Server README for details but it can easily be installed via ‘brew install libimobiledevice’ on MAC.”},{“results”:”Session 278b848c-442c-4806-a789-25f2e68f8588 failed to start with error: Unable to find ios-deploy on your path! Is it installed and available? See the Synergy Server README for details but it can easily be installed via ‘brew install ios-deploy’ on MAC.”},{“results”:”Session 278b848c-442c-4806-a789-25f2e68f8588 failed to start with error: Unable to find Appium on your path! Is it installed and available? See the Synergy Server README for details but it can easily be installed via ‘npm install -g appium’ on MAC and windows.”},{“results”:”Session 278b848c-442c-4806-a789-25f2e68f8588 failed to start with error: The device at 00008030-000A0D012152402E did not respond! Is the device online and reachable?”}]

Can anyone clarify what can cause this issue, please?
Note: I’ve removed node and moved it to usr/local/bin path (opt/homebrew/bin was set as path for node before) but that didn’t help. Now I see that appium, ios-deploy and ios_webkit_debug_proxy are also in /opt/homebrew/bin folder, maybe that can be the problem?

I’ve tried reinstalling node so that it is inside usr/local/bin and updated Xcode to use the latest release, also I tried different versions of Synergy server. No results, the same error.

[ad_2]

Source link

Leave a Reply

Your email address will not be published.