You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Appium+Protractor在Linux平台用multiCapabilities可行吗?配置报错求助

Appium + Protractor MultiCapabilities on Linux: Feasibility & Fix for Driver Error

Short Answer

Absolutely, using multiCapabilities to run cross-platform tests (Android patient app + desktop Chrome doctor web UI) with Appium and Protractor on Linux is totally feasible. The error you’re seeing comes from a small configuration mistake, not a limitation of the setup itself.

What’s Causing the "Could not find a driver for platformName..." Error?

Looking at your config, the Chrome capability includes platformName:'linux'—this is unnecessary for desktop browser sessions. Protractor uses ChromeDriver directly for desktop Chrome tests, and adding this platform-specific parameter confuses it into searching for a driver that doesn’t exist for desktop setups.

Fixed MultiCapabilities Configuration

Here’s the corrected config with the problematic line removed:

multiCapabilities: [
  { 
    browserName: 'android', 
    platformName: 'android', 
    platformVersion: '6.0', 
    deviceName: 'android', 
    autoWebview: true, 
    app: '/home/myPc/e2e/build/android/patient.apk', 
    autoGrantPermissions: true,
    framework: 'jasmine' 
  },
  { 
    browserName: 'chrome' 
    // Removed platformName: 'linux' — no need for desktop Chrome tests
  }
]

Key Tips for Smooth Execution on Linux

  • Appium Service: Make sure the Appium server is running before launching your tests. You can start it manually via appium in the terminal, or configure Protractor to spin it up automatically using the appium section in your config file.
  • Android Environment Check: Verify your Linux machine has the Android SDK installed, adb is added to your system PATH, and your Android device/emulator is recognized (run adb devices to confirm).
  • ChromeDriver Compatibility: For the desktop Chrome session, ensure your ChromeDriver version matches the installed Chrome browser version on your Linux machine. Protractor’s webdriver-manager can handle this automatically, but double-check if you hit Chrome-related errors.
  • Resource Management: If running an Android emulator alongside desktop Chrome, make sure your Linux machine has enough RAM and CPU to handle both sessions without slowdowns or crashes.

内容的提问来源于stack exchange,提问作者Uttam Panara

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 03:23:23