Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WD does not get the session id with appium. #630

Open
jose-larrubia-savia opened this issue Oct 1, 2021 · 1 comment
Open

WD does not get the session id with appium. #630

jose-larrubia-savia opened this issue Oct 1, 2021 · 1 comment

Comments

@jose-larrubia-savia
Copy link

jose-larrubia-savia commented Oct 1, 2021

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.

image

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);
});```
@jlipps
Copy link
Collaborator

jlipps commented Oct 1, 2021

This project is not maintained and is not guaranteed to be W3C compatible. It's recommended to migrate to WebdriverIO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants