selenium 遇到chrome 弹出是否保存密码框

--待验证(以下是java脚本)

ChromeOptions options = new ChromeOptions();
            options.addArguments("--start-maximized");
            options.addArguments("--disable-popup-blocking");
            options.addArguments("no-sandbox");
            options.addArguments("disable-extensions");
            options.addArguments("no-default-browser-check");

            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);

            WebDriver driver = new ChromeDriver(options);

 

posted @ 2017-06-02 10:53  AlamZ  阅读(2119)  评论(0编辑  收藏  举报