@@ -18,7 +18,7 @@ public class OptionsTest extends BaseTest {
1818
1919 @ Test
2020 public void setPageLoadStrategyNormal () {
21- ChromeOptions chromeOptions = new ChromeOptions ();
21+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
2222 chromeOptions .setPageLoadStrategy (PageLoadStrategy .NORMAL );
2323 WebDriver driver = new ChromeDriver (chromeOptions );
2424 try {
@@ -31,7 +31,7 @@ public void setPageLoadStrategyNormal() {
3131
3232 @ Test
3333 public void setPageLoadStrategyEager () {
34- ChromeOptions chromeOptions = new ChromeOptions ();
34+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
3535 chromeOptions .setPageLoadStrategy (PageLoadStrategy .EAGER );
3636 WebDriver driver = new ChromeDriver (chromeOptions );
3737 try {
@@ -44,7 +44,7 @@ public void setPageLoadStrategyEager() {
4444
4545 @ Test
4646 public void setPageLoadStrategyNone () {
47- ChromeOptions chromeOptions = new ChromeOptions ();
47+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
4848 chromeOptions .setPageLoadStrategy (PageLoadStrategy .NONE );
4949 WebDriver driver = new ChromeDriver (chromeOptions );
5050 try {
@@ -57,7 +57,7 @@ public void setPageLoadStrategyNone() {
5757
5858 @ Test
5959 public void setAcceptInsecureCerts () {
60- ChromeOptions chromeOptions = new ChromeOptions ();
60+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
6161 chromeOptions .setAcceptInsecureCerts (true );
6262 WebDriver driver = new ChromeDriver (chromeOptions );
6363 try {
@@ -70,30 +70,30 @@ public void setAcceptInsecureCerts() {
7070
7171 @ Test
7272 public void getBrowserName () {
73- ChromeOptions chromeOptions = new ChromeOptions ();
73+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
7474 String name = chromeOptions .getBrowserName ();
7575 Assertions .assertFalse (name .isEmpty (), "Browser name should not be empty" );
7676 }
7777
7878 @ Test
7979 public void setBrowserVersion () {
80- ChromeOptions chromeOptions = new ChromeOptions ();
80+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
8181 String version = "latest" ;
8282 chromeOptions .setBrowserVersion (version );
8383 Assertions .assertEquals (version , chromeOptions .getBrowserVersion ());
8484 }
8585
8686 @ Test
8787 public void setPlatformName () {
88- ChromeOptions chromeOptions = new ChromeOptions ();
88+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
8989 String platform = "OS X 10.6" ;
9090 chromeOptions .setPlatformName (platform );
9191 Assertions .assertEquals (platform , chromeOptions .getPlatformName ().toString ());
9292 }
9393
9494 @ Test
9595 public void setScriptTimeout () {
96- ChromeOptions chromeOptions = new ChromeOptions ();
96+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
9797 Duration duration = Duration .of (5 , ChronoUnit .SECONDS );
9898 chromeOptions .setScriptTimeout (duration );
9999
@@ -108,7 +108,7 @@ public void setScriptTimeout() {
108108
109109 @ Test
110110 public void setPageLoadTimeout () {
111- ChromeOptions chromeOptions = new ChromeOptions ();
111+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
112112 Duration duration = Duration .of (5 , ChronoUnit .SECONDS );
113113 chromeOptions .setPageLoadTimeout (duration );
114114
@@ -123,7 +123,7 @@ public void setPageLoadTimeout() {
123123
124124 @ Test
125125 public void setImplicitWaitTimeout () {
126- ChromeOptions chromeOptions = new ChromeOptions ();
126+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
127127 Duration duration = Duration .of (5 , ChronoUnit .SECONDS );
128128 chromeOptions .setImplicitWaitTimeout (duration );
129129
@@ -138,7 +138,7 @@ public void setImplicitWaitTimeout() {
138138
139139 @ Test
140140 public void setUnhandledPromptBehaviour () {
141- ChromeOptions chromeOptions = new ChromeOptions ();
141+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
142142 chromeOptions .setUnhandledPromptBehaviour (UnexpectedAlertBehaviour .DISMISS_AND_NOTIFY );
143143 //verify the capability object is not null
144144 Object capabilityObject = chromeOptions .getCapability (CapabilityType .UNHANDLED_PROMPT_BEHAVIOUR );
@@ -148,7 +148,7 @@ public void setUnhandledPromptBehaviour() {
148148
149149 @ Test
150150 public void setWindowRect () {
151- ChromeOptions chromeOptions = new ChromeOptions ();
151+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
152152 chromeOptions .setCapability (CapabilityType .SET_WINDOW_RECT , true );
153153 //verify the capability object is not null
154154 Object capabilityObject = chromeOptions .getCapability (CapabilityType .SET_WINDOW_RECT );
@@ -160,7 +160,7 @@ public void setWindowRect() {
160160
161161 @ Test
162162 public void setStrictFileInteractability () {
163- ChromeOptions chromeOptions = new ChromeOptions ();
163+ ChromeOptions chromeOptions = getDefaultChromeOptions ();
164164 chromeOptions .setCapability (CapabilityType .STRICT_FILE_INTERACTABILITY , true );
165165 //verify the capability object is not null
166166 Object capabilityObject = chromeOptions .getCapability (CapabilityType .STRICT_FILE_INTERACTABILITY );
0 commit comments