33import aquality .selenium .browser .AqualityServices ;
44import aquality .selenium .browser .devtools .NetworkHandling ;
55import org .openqa .selenium .TimeoutException ;
6- import org .openqa .selenium .devtools .v148 .network .model .ConnectionType ;
7- import org .openqa .selenium .devtools .v148 .network .model .NetworkConditions ;
6+ import org .openqa .selenium .devtools .v150 .network .model .ConnectionType ;
7+ import org .openqa .selenium .devtools .v150 .network .model .NetworkConditions ;
88import org .testng .Assert ;
99import org .testng .annotations .Test ;
1010import tests .BaseTest ;
@@ -30,11 +30,11 @@ private NetworkHandling network() {
3030
3131 private List <NetworkConditions > getNetworkConditions (int downloadThroughput , int uploadThroughput , ConnectionType connectionType ) {
3232 return Collections .singletonList (new NetworkConditions (welcomeForm .getUrl (), LATENCY , downloadThroughput , uploadThroughput ,
33- Optional .of (connectionType ), Optional .empty (), Optional .empty (), Optional .empty ()));
33+ Optional .of (connectionType ), Optional .empty (), Optional .empty (), Optional .empty (), Optional . empty () ));
3434 }
3535 private List <NetworkConditions > getNetworkConditions (int downloadThroughput , int uploadThroughput ) {
3636 return Collections .singletonList (new NetworkConditions (welcomeForm .getUrl (), LATENCY , downloadThroughput , uploadThroughput ,
37- Optional .empty (), Optional .empty (), Optional .empty (), Optional .empty ()));
37+ Optional .empty (), Optional .empty (), Optional .empty (), Optional .empty (), Optional . empty () ));
3838 }
3939
4040 @ Test
@@ -43,7 +43,7 @@ public void networkSpeedEmulationTest() {
4343 getBrowser ().goTo (welcomeForm .getUrl ());
4444 Assert .assertTrue (welcomeForm .state ().waitForDisplayed (), "Form must be opened" );
4545 boolean isOffline = true ;
46- network ().emulateConditionsByRule (isOffline , getNetworkConditions (-1 , -1 ));
46+ network ().emulateConditionsByRule (isOffline , isOffline , getNetworkConditions (-1 , -1 ));
4747 network ().overrideState (isOffline , LATENCY , -1 , -1 );
4848 getBrowser ().refresh ();
4949 getBrowser ().waitForPageToLoad ();
0 commit comments