Strongfilms beats
Strongfilms beats

Reputation: 1

Appium capability baseUrl is not working when trying to connect to remote server

I am trying to run my tests with a remote Appium server. Until now, I have always used the server in the same machine where the tests are being run, so I was using url + port (localhost:4723).

The problem I am facing now is that the "baseUrl" capability does not make any change, it seems that it is being ignored. I am using Appium 1.22.3

This is my code:

const url = '88.123.123.23'
const path = '/ws/hub';
const timeout = 20000;

export function createAndroidConfig(port: number, deviceName: string, id: string): RemoteOptions {
    const config: RemoteOptions = {
        path: path,
        port: port,
        logLevel: 'trace',
        baseUrl: url,
        waitforTimeout: timeout,
        capabilities: {
            udid: id,
            automationName: 'UiAutomator2',
            platformName: 'Android',
            deviceName: deviceName,
            autoGrantPermissions: true,
            unicodeKeyboard: true,
            resetKeyboard: true,
            'appium:app': apkPath,
            newCommandTimeout: 100000,
            unlockType: "pin",
            unlockKey: "0000"
        }
    }
    return config;
}

The error I get:

Unable to connect to "http://localhost:4723/ws/hub", make sure browser driver is running on that address.

I have searched for it, thinking it could be an Appium bug, but I did not find information.

If I change the port or path, the changes do take effect, but url does not.

Upvotes: 0

Views: 429

Answers (1)

Dinesh Borude
Dinesh Borude

Reputation: 3

const path = '/ws/hub';

/wd/hub replace this with

Upvotes: 0

Related Questions