wd
wd copied to clipboard
WD does not get the session id with appium.
The problem
WD is generating calls without the session ID so we are receiving 404 no route found on every configuration tested.
Environment
Appium version (or git revision) that exhibits the issue: 1.22 WD version: 1.14 Desktop OS/version used to run Appium: Azure Devops Hosted MacOs-11 Npm or Yarn package manager: npm Mobile platform/version under test: android api 27 Real device or emulator/simulator: emulator
Details
The problem here is that the same configuration is working on a local machine whilst it doesn't on the Azure Devops Hosted MacOs-11. I opened a bug on appium cause we thought that the problem would be something related to them but appium is working as intended.
As you can see in the image above, the route that sends the message is not formed correctly, its's missing the session Id. Is there anything we can do to include there the session id?
Link to logs
https://gist.github.com/jose-larrubia-savia/753937f738f54df2b8e520a2c5c4e548
Code Sample
import {USERNAME, PASSWORD, API, APK_PATH, DEVICE_NAME, SCREENSHOT_PATH} from './e2e.config.js'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
const PORT = 4723;
const config = {
"platformName": "Android",
"deviceName": DEVICE_NAME,
"app": APK_PATH,
"automationName": "UiAutomator2",
"appWaitForLaunch": false
}
const driver = wd.remote("http://127.0.0.1:4723/wd/hub", 'promiseChain');
beforeAll(async () => {
await driver.init(config);
await driver.sleep(10000);
})
test('when click less than 5 times at login-image exit dev mode wont be accesible', async () => {
const element = await driver.elementByAccessibilityId('login-Image')
await element.click()
await element.click()
await element.click()
await element.click()
await element.click()
await driver.sleep(3000);
expect(await driver.hasElementByAccessibilityId('exitdevmode-button')).toBe(false);
});```
This project is not maintained and is not guaranteed to be W3C compatible. It's recommended to migrate to WebdriverIO.