Search code examples
javaandroidandroid-emulatorappiumselenium-chromedriver

How to disable save password on ChromeDriver use Appium and AndroidStudio


I have been spending a lot of time using the common opinion about the correct capability that solves this problem.

On Java:

Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("credentials_enable_service", false);
prefs.put("profile.password_manager_enabled", false);
options.setExperimentalOption("prefs", prefs);

Or this other:

options.addArguments("--disable-save-password-bubble");

And never worked fine for me.

System configuration:

  • Java: jdk1.8.0_131
  • Selenium: 3.0.1
  • Appium: 1.6.5

Solution

  • I solved the problem and not is a capability. I align the system configuration with that:

    • ChromeDriver: 2.31.488763 (2.31)
    • Apk (For emulator): 59.0.3071.125

    It seems is important the apk version on emulator and the ChromeDriver version appium are using.

    I'm using this capabilities:

        ChromeOptions options = new ChromeOptions();
        options.addArguments("--disable-extensions", "test-type",
                "no-default-browser-check", "ignore-certificate-errors",
                "--disable-notifications",
                "--disable-offer-store-unmasked-wallet-cards",
                "--disable-autofill-keyboard-accessory-view");
        options.addArguments("--disable-translate");