Skip to content

Commit

Permalink
Update version 2.4.5 (optimize)
Browse files Browse the repository at this point in the history
  • Loading branch information
vothaian committed Sep 6, 2024
1 parent 926ff9d commit 2fc95c1
Show file tree
Hide file tree
Showing 17 changed files with 339 additions and 402 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.5
======
Sep 07, 2024
* Optimize method in WebUI keyword
* Remove handle QR Code (google.zxing)

v2.4.4
======
Sep 05, 2024
Expand Down
2 changes: 1 addition & 1 deletion docs/com/anhtester/helpers/Helpers.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<h1 title="Class Helpers" class="title">Class Helpers</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">com.anhtester.helpers.Helpers</div>
<div class="inheritance">com.anhtester.helpers.SystemHelpers</div>
</div>
<section class="class-description" id="class-description">
<hr>
Expand Down
6 changes: 3 additions & 3 deletions docs/com/anhtester/helpers/class-use/Helpers.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Wed May 22 19:39:35 ICT 2024 -->
<title>Uses of Class com.anhtester.helpers.Helpers</title>
<title>Uses of Class com.anhtester.helpers.SystemHelpers</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<meta name="dc.created" content="2024-05-22">
Expand Down Expand Up @@ -49,9 +49,9 @@
<div class="flex-content">
<main role="main">
<div class="header">
<h1 title="Uses of Class com.anhtester.helpers.Helpers" class="title">Uses of Class<br>com.anhtester.helpers.Helpers</h1>
<h1 title="Uses of Class com.anhtester.helpers.SystemHelpers" class="title">Uses of Class<br>com.anhtester.helpers.SystemHelpers</h1>
</div>
No usage of com.anhtester.helpers.Helpers</main>
No usage of com.anhtester.helpers.SystemHelpers</main>
</div>
</div>
</body>
Expand Down
18 changes: 2 additions & 16 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.4</version>
<version>2.4.5</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 @@ -31,7 +31,7 @@
<aspectjweaver.version>1.9.22.1</aspectjweaver.version>
<ashot.version>1.5.4</ashot.version>
<log4j.version>2.23.1</log4j.version>
<slf4j.version>2.0.13</slf4j.version>
<slf4j.version>2.0.16</slf4j.version>
<allure-testng.version>2.29.0</allure-testng.version>
<allure-plugin-api.version>2.30.0</allure-plugin-api.version>
<allure-maven.version>2.13.0</allure-maven.version>
Expand All @@ -47,7 +47,6 @@
<datafaker.version>2.3.1</datafaker.version>
<monte-screen-recorder.version>0.7.7.0</monte-screen-recorder.version>
<mysql-connector-java.version>8.0.33</mysql-connector-java.version>
<google.zxing.version>3.5.3</google.zxing.version>
<lombok.version>1.18.34</lombok.version>
<google.guava.version>33.3.0-jre</google.guava.version>
<javax.mail.version>1.6.2</javax.mail.version>
Expand Down Expand Up @@ -283,19 +282,6 @@
<version>${mysql-connector-java.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.google.zxing/javase -->
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>${google.zxing.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.zxing/core -->
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>${google.zxing.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
<dependency>
<groupId>org.aspectj</groupId>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/anhtester/constants/FrameworkConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

package com.anhtester.constants;

import com.anhtester.helpers.Helpers;
import com.anhtester.helpers.SystemHelpers;
import com.anhtester.helpers.PropertiesHelpers;
import com.anhtester.utils.ReportUtils;

Expand All @@ -20,7 +20,7 @@ private FrameworkConstants() {
PropertiesHelpers.loadAllFiles();
}

public static final String PROJECT_PATH = Helpers.getCurrentDir();
public static final String PROJECT_PATH = SystemHelpers.getCurrentDir();
public static final String EXCEL_DATA_FILE_PATH = PropertiesHelpers.getValue("EXCEL_DATA_FILE_PATH");
public static final String JSON_DATA_FILE_PATH = PropertiesHelpers.getValue("JSON_DATA_FILE_PATH");
public static final String EXCEL_CMS_LOGIN = PropertiesHelpers.getValue("EXCEL_CMS_LOGIN");
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/anhtester/helpers/CaptureHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public static void stopRecord() {

public static void captureScreenshot(WebDriver driver, String screenName) {
try {
String path = Helpers.getCurrentDir() + FrameworkConstants.EXPORT_CAPTURE_PATH;
String path = SystemHelpers.getCurrentDir() + FrameworkConstants.EXPORT_CAPTURE_PATH;
File file = new File(path);
if (!file.exists()) {
LogUtils.info("No Folder: " + path);
Expand Down Expand Up @@ -124,7 +124,7 @@ public static File getScreenshotFile(String screenshotName) {
throw new RuntimeException(e);
}

String path = Helpers.getCurrentDir() + FrameworkConstants.EXTENT_REPORT_FOLDER + File.separator + "images";
String path = SystemHelpers.getCurrentDir() + FrameworkConstants.EXTENT_REPORT_FOLDER + File.separator + "images";
File folder = new File(path);
if (!folder.exists()) {
folder.mkdir();
Expand All @@ -151,7 +151,7 @@ public static String getScreenshotRelativePath(String screenshotName) {
throw new RuntimeException(e);
}

String path = Helpers.getCurrentDir() + FrameworkConstants.EXTENT_REPORT_FOLDER + File.separator + "images";
String path = SystemHelpers.getCurrentDir() + FrameworkConstants.EXTENT_REPORT_FOLDER + File.separator + "images";

File folder = new File(path);
if (!folder.exists()) {
Expand Down Expand Up @@ -182,7 +182,7 @@ public static String getScreenshotAbsolutePath(String screenshotName) {
throw new RuntimeException(e);
}

String path = Helpers.getCurrentDir() + FrameworkConstants.EXTENT_REPORT_FOLDER + File.separator + "images";
String path = SystemHelpers.getCurrentDir() + FrameworkConstants.EXTENT_REPORT_FOLDER + File.separator + "images";

File folder = new File(path);
if (!folder.exists()) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/anhtester/helpers/JsonHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public class JsonHelpers {
private StringBuffer stringBuffer;
private DocumentContext jsonContext;
private String lines;
private String jsonFilePathDefault = Helpers.getCurrentDir() + "src/test/resources/datajson/store.json";
private String jsonFilePathDefault = SystemHelpers.getCurrentDir() + "src/test/resources/datajson/store.json";

public void setJsonFile(String jsonPath) {
try {
bufferedReader = new BufferedReader(new FileReader(Helpers.getCurrentDir() + jsonPath));
bufferedReader = new BufferedReader(new FileReader(SystemHelpers.getCurrentDir() + jsonPath));
stringBuffer = new StringBuffer();
while ((lines = bufferedReader.readLine()) != null) {
stringBuffer.append(lines);
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/anhtester/helpers/PropertiesHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static Properties loadAllFiles() {

for (String f : files) {
Properties tempProp = new Properties();
linkFile = Helpers.getCurrentDir() + f;
linkFile = SystemHelpers.getCurrentDir() + f;
file = new FileInputStream(linkFile);
tempProp.load(file);
properties.putAll(tempProp);
Expand All @@ -56,7 +56,7 @@ public static Properties getProperties() {
public static void setFile(String relPropertiesFilePath) {
properties = new Properties();
try {
linkFile = Helpers.getCurrentDir() + relPropertiesFilePath;
linkFile = SystemHelpers.getCurrentDir() + relPropertiesFilePath;
file = new FileInputStream(linkFile);
properties.load(file);
file.close();
Expand All @@ -68,7 +68,7 @@ public static void setFile(String relPropertiesFilePath) {
public static void setDefaultFile() {
properties = new Properties();
try {
linkFile = Helpers.getCurrentDir() + relPropertiesFilePathDefault;
linkFile = SystemHelpers.getCurrentDir() + relPropertiesFilePathDefault;
file = new FileInputStream(linkFile);
properties.load(file);
file.close();
Expand All @@ -82,7 +82,7 @@ public static String getValue(String key) {
try {
if (file == null && properties == null) {
properties = new Properties();
linkFile = Helpers.getCurrentDir() + relPropertiesFilePathDefault;
linkFile = SystemHelpers.getCurrentDir() + relPropertiesFilePathDefault;
file = new FileInputStream(linkFile);
properties.load(file);
file.close();
Expand All @@ -101,10 +101,10 @@ public static void setValue(String key, String keyValue) {
try {
if (file == null) {
properties = new Properties();
file = new FileInputStream(Helpers.getCurrentDir() + relPropertiesFilePathDefault);
file = new FileInputStream(SystemHelpers.getCurrentDir() + relPropertiesFilePathDefault);
properties.load(file);
file.close();
out = new FileOutputStream(Helpers.getCurrentDir() + relPropertiesFilePathDefault);
out = new FileOutputStream(SystemHelpers.getCurrentDir() + relPropertiesFilePathDefault);
}
//Write to the same Prop file as the extracted file
out = new FileOutputStream(linkFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import java.util.Locale;
import java.util.regex.Pattern;

public final class Helpers {
public final class SystemHelpers {

public Helpers() {
public SystemHelpers() {
super();
}

Expand Down
Loading

0 comments on commit 2fc95c1

Please sign in to comment.