diff --git a/pom.xml b/pom.xml
index d8287ae..b7c4863 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,12 +70,12 @@
com.github.aquality-automation
aquality-selenium-core
- 5.1.0
+ 5.2.0
org.seleniumhq.selenium
selenium-java
- 4.51.0
+ 4.52.0
org.apache.commons
diff --git a/src/main/java/aquality/selenium/browser/devtools/EmulationHandling.java b/src/main/java/aquality/selenium/browser/devtools/EmulationHandling.java
index 2520bcd..46d05ad 100644
--- a/src/main/java/aquality/selenium/browser/devtools/EmulationHandling.java
+++ b/src/main/java/aquality/selenium/browser/devtools/EmulationHandling.java
@@ -136,7 +136,7 @@ public void setDeviceMetricsOverride(Integer width, Integer height, Number devic
setDeviceMetricsOverride(width, height, deviceScaleFactor, mobile, Optional.empty(),
Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(),
Optional.empty(), screenOrientation, Optional.empty(), Optional.empty(),
- Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
+ Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
}
/**
@@ -158,6 +158,8 @@ public void setDeviceMetricsOverride(Integer width, Integer height, Number devic
* @param devicePosture The posture of the device (e.g., foldable devices).
* @param scrollbarType The type of the scrollbars to render (e.g., mobile vs desktop). Ignored if |dontSetVisibleSize| is set.
* @param screenOrientationLockEmulation Enables screen orientation lock emulation that intercepts calls to screen.orientation.lock().
+ * @param viewportMeta Enables viewport-meta handling. Use "enable" to handle the page's viewport meta tag, or "default" for the default behavior. If the mobile parameter is true, this is enabled by default.
+ * @param textLayoutMode The text layout mode to use. Use "mobile" to enable mobile-style text autosizing, or "default" for the default layout. If the mobile parameter is true, this is set to mobile by default.
*/
public void setDeviceMetricsOverride(Integer width, Integer height, Number deviceScaleFactor, Boolean mobile,
Optional scale, Optional screenWidth, Optional screenHeight,
@@ -166,10 +168,11 @@ public void setDeviceMetricsOverride(Integer width, Integer height, Number devic
Optional displayFeature, Optional devicePosture,
Optional scrollbarType,
Optional screenOrientationLockEmulation,
- Optional setDeviceMetricsOverrideViewportMeta) {
+ Optional viewportMeta,
+ Optional textLayoutMode) {
tools.sendCommand(Emulation.setDeviceMetricsOverride(width, height, deviceScaleFactor, mobile, scale, screenWidth,
screenHeight, positionX, positionY, dontSetVisibleSize, screenOrientation, viewport, displayFeature,
- devicePosture, scrollbarType, screenOrientationLockEmulation, setDeviceMetricsOverrideViewportMeta));
+ devicePosture, scrollbarType, screenOrientationLockEmulation, viewportMeta, textLayoutMode));
}
/**
diff --git a/src/test/java/tests/usecases/devtools/DeviceEmulationTest.java b/src/test/java/tests/usecases/devtools/DeviceEmulationTest.java
index 389cca3..42e8e79 100644
--- a/src/test/java/tests/usecases/devtools/DeviceEmulationTest.java
+++ b/src/test/java/tests/usecases/devtools/DeviceEmulationTest.java
@@ -3,8 +3,8 @@
import aquality.selenium.browser.AqualityServices;
import aquality.selenium.browser.devtools.EmulationHandling;
import com.google.common.collect.ImmutableMap;
-import org.openqa.selenium.devtools.v155.emulation.Emulation;
-import org.openqa.selenium.devtools.v155.emulation.model.DisplayFeature;
+import org.openqa.selenium.devtools.v156.emulation.Emulation;
+import org.openqa.selenium.devtools.v156.emulation.model.DisplayFeature;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -44,7 +44,8 @@ public void setAndClearDeviceMetricsOverrideWithVersionSpecificParametersTest()
AqualityServices.getBrowser().devTools().sendCommand(Emulation.setDeviceMetricsOverride(
WIDTH, HEIGHT, SCALE_FACTOR, IS_MOBILE, Optional.empty(), Optional.empty(), Optional.empty(),
Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(),
- Optional.of(DISPLAY_FEATURE), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()
+ Optional.of(DISPLAY_FEATURE), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(),
+ Optional.empty()
));
AqualityServices.getLogger().info("success");
});
diff --git a/src/test/java/tests/usecases/devtools/OverrideUserAgentTest.java b/src/test/java/tests/usecases/devtools/OverrideUserAgentTest.java
index 3909d84..c199acf 100644
--- a/src/test/java/tests/usecases/devtools/OverrideUserAgentTest.java
+++ b/src/test/java/tests/usecases/devtools/OverrideUserAgentTest.java
@@ -8,7 +8,7 @@
import manytools.BrowserLanguageForm;
import manytools.UserAgentForm;
import org.openqa.selenium.devtools.idealized.Network;
-import org.openqa.selenium.devtools.v155.emulation.Emulation;
+import org.openqa.selenium.devtools.v156.emulation.Emulation;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;