Skip to content

Commit

Permalink
Update version 2.4.8 upgrade Selenium 4.27.0
Browse files Browse the repository at this point in the history
  • Loading branch information
anhtester committed Dec 17, 2024
1 parent 088b3bc commit bdca74a
Show file tree
Hide file tree
Showing 10 changed files with 150 additions and 91 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v2.4.8
======
Dec 17, 2024
* Update Selenium 4.27.0 support CDP 131
* Edit function waitForElementVisible in WebUI class

v2.4.7
======
Nov 1, 2024
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.anhtester</groupId>
<artifactId>anhtester-selenium-java</artifactId>
<version>2.4.7</version>
<version>2.4.8</version>
<name>AutomationFrameworkSelenium</name>
<url>https://github.com/anhtester/AutomationFrameworkSelenium</url>
<description>Test Automation Framework Selenium Java with TestNG building by Anh Tester</description>
Expand All @@ -25,11 +25,11 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java-compiler.version>17</java-compiler.version>
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
<selenium.version>4.26.0</selenium.version>
<selenium.version>4.27.0</selenium.version>
<testng.version>7.10.2</testng.version>
<aspectjweaver.version>1.9.22.1</aspectjweaver.version>
<ashot.version>1.5.4</ashot.version>
<allure-testng.version>2.29.0</allure-testng.version>
<allure-testng.version>2.29.1</allure-testng.version>
<allure-plugin-api.version>2.32.0</allure-plugin-api.version>
<allure-maven.version>2.15.2</allure-maven.version>
<allure-environment-writer.version>1.0.0</allure-environment-writer.version>
Expand All @@ -47,7 +47,7 @@
<lombok.version>1.18.36</lombok.version>
<javax.mail.version>1.6.2</javax.mail.version>
<zip.version>1.17</zip.version>
<jackson.version>2.18.1</jackson.version>
<jackson.version>2.18.2</jackson.version>
<java-telegram-bot-api.version>7.11.0</java-telegram-bot-api.version>
<commons-lang3.version>3.17.0</commons-lang3.version>
<mysql-connector-j.version>9.1.0</mysql-connector-j.version>
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/com/anhtester/driver/BrowserFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ public WebDriver createDriver() {
@Override
public ChromeOptions getOptions() {
ChromeOptions options = new ChromeOptions();

Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("profile.default_content_setting_values.notifications", 2);
prefs.put("credentials_enable_service", false);
prefs.put("profile.password_manager_enabled", false);
prefs.put("autofill.profile_enabled", false);
prefs.put("autofill.profile_enabled", false); //Turn off Save Address popup
options.setExperimentalOption("prefs", prefs);

options.addArguments("--disable-extensions");
Expand All @@ -55,7 +56,7 @@ public ChromeOptions getOptions() {
options.addArguments("--disable-gpu");
options.addArguments("--no-sandbox");
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--window-size=1880,1000");
options.addArguments("--window-size=1850,1000");
}

return options;
Expand All @@ -71,6 +72,7 @@ public WebDriver createDriver() {
@Override
public EdgeOptions getOptions() {
EdgeOptions options = new EdgeOptions();

Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("profile.default_content_setting_values.notifications", 2);
prefs.put("credentials_enable_service", false);
Expand All @@ -90,7 +92,7 @@ public EdgeOptions getOptions() {
options.addArguments("--disable-gpu");
options.addArguments("--no-sandbox");
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--window-size=1880,1000");
options.addArguments("--window-size=1850,1000");
}

return options;
Expand All @@ -111,8 +113,8 @@ public FirefoxOptions getOptions() {

if (Boolean.valueOf(FrameworkConstants.HEADLESS) == true) {
options.addArguments("-headless");
options.addArguments("--width=1920");
options.addArguments("--height=1080");
options.addArguments("--width=1850");
options.addArguments("--height=1000");
}

return options;
Expand Down
Loading

0 comments on commit bdca74a

Please sign in to comment.