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

AppiumV2 config is not working well with LambdaTest #4575

Open
AllysonYuShiong opened this issue Nov 14, 2024 · 1 comment
Open

AppiumV2 config is not working well with LambdaTest #4575

AllysonYuShiong opened this issue Nov 14, 2024 · 1 comment

Comments

@AllysonYuShiong
Copy link

What are you trying to achieve?

To output the correct test case title in the LambdaTest dashboard. When I commented appiumV2: true, I can get the correct title displayed on the LambdaTest dashboard, when I use appiumV2: true, I get duplicate test title on the LambdaTest dashboard. I'm running 2 test cases continually as below. FYI, I have reached out to LambdaTest team and confirm this is not an issue from their side, as their appium version displayed from console is already version 2.X.

Screenshot 2024-11-14 at 11 34 01 AM

Adding appiumV2: true into the config file will dismiss the message below.

The Appium core team does not maintain Appium 1.x anymore since the 1st of January 2022. Please migrating to Appium 2.x by adding appiumV2: true to your config.
More info: https://bit.ly/appium-v2-migration
This Appium 1.x support will be removed in next major release.

However, it doesn't work well with my config below for LambdaTest

Appium: {
    automationName: 'uiautomator2',
    platform: 'Android',
    hostname: 'mobile-hub.lambdatest.com',
    port: 80,
    timeout: 60000,
    user: process.env.LAMBDATEST_USERNAME,
    key: process.env.LAMBDATEST_ACCESS_KEY,
    appiumV2: true,
    desiredCapabilities: {
      platformName: 'Android',
      isRealMobile: true,
      deviceName: 'Galaxy S23+',
      platformVersion: '1[0-4]',
      project: 'Android Mobile Automation',
      build: process.env.BUILD_VERSION_NUMBER,
      name: 'Android Regression Test',
      idleTimeout: 900,
      queueTimeout: 900,
      autoGrantPermissions: process.env.DEFAULT_AUTO_GRANT_PERMISSIONS === 'true' ? false : true,
      app: appId,
      appiumVersion: '2.11.2',
    },
  },

and produce error below:

Error: Can't connect to WebDriver.
Error: Invalid or unsupported WebDriver capabilities found ("appiumVersion"). Ensure to only use valid W3C WebDriver capabilities (see https://w3c.github.io/webdriver/#capabilities).If you run your tests on a remote vendor, like Sauce Labs or BrowserStack, make sure that you put them into vendor specific capabilities, e.g. "sauce:options" or "bstack:options". Please reach out to your vendor support team if you have further questions.

Please make sure Selenium Server is running and accessible
  • CodeceptJS version: 3.6.5
  • NodeJS Version: v22.7.0
  • Operating System: MacOS 14.6.1 (23G93)
  • Appium
@mjalav
Copy link

mjalav commented Nov 19, 2024

Try to use platform "android" instead of "Android" . (don't use capital A).
also as error mentioned, your config doesn't match with W3C driver capacities. try to add prefix for those configs for appium. for example for appiumVersion use "appium:appiumVersion"
Here is one example:
Appium: {
appiumV2: true,
platform: "android",
path: "/",
app: "D:/a/android.apk",
desiredCapabilities: {
"appium:platformVersion": "10",
"appium:automationName": "UiAutomator2",
"appium:deviceName": "Test",
"appium:appiumVersion": "2.11.2"
},

},

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