Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1E317200C8F for ; Fri, 9 Jun 2017 21:15:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1CE53160BCA; Fri, 9 Jun 2017 19:15:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0B2FD160BB6 for ; Fri, 9 Jun 2017 21:15:43 +0200 (CEST) Received: (qmail 40016 invoked by uid 500); 9 Jun 2017 19:15:43 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 40008 invoked by uid 99); 9 Jun 2017 19:15:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jun 2017 19:15:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 77020E0210; Fri, 9 Jun 2017 19:15:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aharui@apache.org To: commits@flex.apache.org Date: Fri, 09 Jun 2017 19:15:43 -0000 Message-Id: <07fae8b110e44246bcffb5e12957da07@git.apache.org> In-Reply-To: <2adbf3d19f424d298dced37473e3e5aa@git.apache.org> References: <2adbf3d19f424d298dced37473e3e5aa@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/4] git commit: [flex-asjs] [refs/heads/release0.8.0] - add firefox profile support. Some machines need it to get around extensions that get in the way archived-at: Fri, 09 Jun 2017 19:15:45 -0000 add firefox profile support. Some machines need it to get around extensions that get in the way Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/f8cccea0 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/f8cccea0 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/f8cccea0 Branch: refs/heads/release0.8.0 Commit: f8cccea06c2f9613c4fa970050860c413a82ada2 Parents: c596b16 Author: Alex Harui Authored: Fri Jun 9 12:09:32 2017 -0700 Committer: Alex Harui Committed: Fri Jun 9 12:09:32 2017 -0700 ---------------------------------------------------------------------- mustella/java/src/marmotinni/MarmotinniRunner.java | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f8cccea0/mustella/java/src/marmotinni/MarmotinniRunner.java ---------------------------------------------------------------------- diff --git a/mustella/java/src/marmotinni/MarmotinniRunner.java b/mustella/java/src/marmotinni/MarmotinniRunner.java index a2f85e4..73061fd 100644 --- a/mustella/java/src/marmotinni/MarmotinniRunner.java +++ b/mustella/java/src/marmotinni/MarmotinniRunner.java @@ -24,6 +24,8 @@ import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.firefox.FirefoxProfile; +import org.openqa.selenium.firefox.internal.ProfilesIni; import java.io.IOException; import java.nio.CharBuffer; @@ -214,6 +216,13 @@ public class MarmotinniRunner extends DefaultHandler { WebDriver driver; if (browser != null && browser.equalsIgnoreCase("chrome")) driver = new ChromeDriver(); + else if (argsMap.containsKey("profile")) + { + ProfilesIni profile = new ProfilesIni(); + FirefoxProfile ffprofile = profile.getProfile(argsMap.get("profile")); + System.out.println("FireFox Profile: " + argsMap.get("profile")); + driver = new FirefoxDriver(ffprofile); + } else driver = new FirefoxDriver();