File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
src/main/java/com/frameworkium/config Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 11package com .frameworkium .config ;
22
3- import java .util .Map ;
4-
53import org .yaml .snakeyaml .Yaml ;
64
5+ import java .util .Map ;
6+
77public enum SystemProperty {
88
99 BROWSER ("browser" ),
@@ -30,7 +30,8 @@ public enum SystemProperty {
3030 JIRA_RESULT_TRANSITION ("jiraResultTransition" ),
3131 MAXIMISE ("maximise" ),
3232 RESOLUTION ("resolution" ),
33- PROXY ("proxy" );
33+ PROXY ("proxy" ),
34+ FIREFOX_PROFILE ("firefoxProfile" );
3435
3536 private String value ;
3637 private static Map configMap = null ;
Original file line number Diff line number Diff line change 33import com .frameworkium .config .DriverType ;
44import org .openqa .selenium .WebDriver ;
55import org .openqa .selenium .firefox .FirefoxDriver ;
6+ import org .openqa .selenium .firefox .internal .ProfilesIni ;
67import org .openqa .selenium .remote .DesiredCapabilities ;
78
9+ import static com .frameworkium .config .SystemProperty .FIREFOX_PROFILE ;
10+
811public class FirefoxImpl extends DriverType {
912
1013 @ Override
@@ -14,6 +17,11 @@ public DesiredCapabilities getDesiredCapabilities() {
1417
1518 @ Override
1619 public WebDriver getWebDriverObject (DesiredCapabilities capabilities ) {
17- return new FirefoxDriver (capabilities );
20+ if (FIREFOX_PROFILE .isSpecified ()) {
21+ return new FirefoxDriver (new ProfilesIni ().getProfile (FIREFOX_PROFILE .getValue ()));
22+ }
23+ else {
24+ return new FirefoxDriver (capabilities );
25+ }
1826 }
1927}
You can’t perform that action at this time.
0 commit comments