Skip to content

Commit 2fc95c1

Browse files
committed
Update version 2.4.5 (optimize)
1 parent 926ff9d commit 2fc95c1

File tree

17 files changed

+339
-402
lines changed

17 files changed

+339
-402
lines changed

CHANGELOG.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
v2.4.5
2+
======
3+
Sep 07, 2024
4+
* Optimize method in WebUI keyword
5+
* Remove handle QR Code (google.zxing)
6+
17
v2.4.4
28
======
39
Sep 05, 2024

docs/com/anhtester/helpers/Helpers.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<h1 title="Class Helpers" class="title">Class Helpers</h1>
7474
</div>
7575
<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>
76-
<div class="inheritance">com.anhtester.helpers.Helpers</div>
76+
<div class="inheritance">com.anhtester.helpers.SystemHelpers</div>
7777
</div>
7878
<section class="class-description" id="class-description">
7979
<hr>

docs/com/anhtester/helpers/class-use/Helpers.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<!-- Generated by javadoc (17) on Wed May 22 19:39:35 ICT 2024 -->
5-
<title>Uses of Class com.anhtester.helpers.Helpers</title>
5+
<title>Uses of Class com.anhtester.helpers.SystemHelpers</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
88
<meta name="dc.created" content="2024-05-22">
@@ -49,9 +49,9 @@
4949
<div class="flex-content">
5050
<main role="main">
5151
<div class="header">
52-
<h1 title="Uses of Class com.anhtester.helpers.Helpers" class="title">Uses of Class<br>com.anhtester.helpers.Helpers</h1>
52+
<h1 title="Uses of Class com.anhtester.helpers.SystemHelpers" class="title">Uses of Class<br>com.anhtester.helpers.SystemHelpers</h1>
5353
</div>
54-
No usage of com.anhtester.helpers.Helpers</main>
54+
No usage of com.anhtester.helpers.SystemHelpers</main>
5555
</div>
5656
</div>
5757
</body>

pom.xml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.anhtester</groupId>
88
<artifactId>anhtester-selenium-java</artifactId>
9-
<version>2.4.4</version>
9+
<version>2.4.5</version>
1010
<name>AutomationFrameworkSelenium</name>
1111
<url>https://github.com/anhtester/AutomationFrameworkSelenium</url>
1212
<description>Test Automation Framework Selenium Java with TestNG building by Anh Tester</description>
@@ -31,7 +31,7 @@
3131
<aspectjweaver.version>1.9.22.1</aspectjweaver.version>
3232
<ashot.version>1.5.4</ashot.version>
3333
<log4j.version>2.23.1</log4j.version>
34-
<slf4j.version>2.0.13</slf4j.version>
34+
<slf4j.version>2.0.16</slf4j.version>
3535
<allure-testng.version>2.29.0</allure-testng.version>
3636
<allure-plugin-api.version>2.30.0</allure-plugin-api.version>
3737
<allure-maven.version>2.13.0</allure-maven.version>
@@ -47,7 +47,6 @@
4747
<datafaker.version>2.3.1</datafaker.version>
4848
<monte-screen-recorder.version>0.7.7.0</monte-screen-recorder.version>
4949
<mysql-connector-java.version>8.0.33</mysql-connector-java.version>
50-
<google.zxing.version>3.5.3</google.zxing.version>
5150
<lombok.version>1.18.34</lombok.version>
5251
<google.guava.version>33.3.0-jre</google.guava.version>
5352
<javax.mail.version>1.6.2</javax.mail.version>
@@ -283,19 +282,6 @@
283282
<version>${mysql-connector-java.version}</version>
284283
</dependency>
285284

286-
<!-- https://mvnrepository.com/artifact/com.google.zxing/javase -->
287-
<dependency>
288-
<groupId>com.google.zxing</groupId>
289-
<artifactId>javase</artifactId>
290-
<version>${google.zxing.version}</version>
291-
</dependency>
292-
<!-- https://mvnrepository.com/artifact/com.google.zxing/core -->
293-
<dependency>
294-
<groupId>com.google.zxing</groupId>
295-
<artifactId>core</artifactId>
296-
<version>${google.zxing.version}</version>
297-
</dependency>
298-
299285
<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
300286
<dependency>
301287
<groupId>org.aspectj</groupId>

src/main/java/com/anhtester/constants/FrameworkConstants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
package com.anhtester.constants;
77

8-
import com.anhtester.helpers.Helpers;
8+
import com.anhtester.helpers.SystemHelpers;
99
import com.anhtester.helpers.PropertiesHelpers;
1010
import com.anhtester.utils.ReportUtils;
1111

@@ -20,7 +20,7 @@ private FrameworkConstants() {
2020
PropertiesHelpers.loadAllFiles();
2121
}
2222

23-
public static final String PROJECT_PATH = Helpers.getCurrentDir();
23+
public static final String PROJECT_PATH = SystemHelpers.getCurrentDir();
2424
public static final String EXCEL_DATA_FILE_PATH = PropertiesHelpers.getValue("EXCEL_DATA_FILE_PATH");
2525
public static final String JSON_DATA_FILE_PATH = PropertiesHelpers.getValue("JSON_DATA_FILE_PATH");
2626
public static final String EXCEL_CMS_LOGIN = PropertiesHelpers.getValue("EXCEL_CMS_LOGIN");

src/main/java/com/anhtester/helpers/CaptureHelpers.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static void stopRecord() {
9292

9393
public static void captureScreenshot(WebDriver driver, String screenName) {
9494
try {
95-
String path = Helpers.getCurrentDir() + FrameworkConstants.EXPORT_CAPTURE_PATH;
95+
String path = SystemHelpers.getCurrentDir() + FrameworkConstants.EXPORT_CAPTURE_PATH;
9696
File file = new File(path);
9797
if (!file.exists()) {
9898
LogUtils.info("No Folder: " + path);
@@ -124,7 +124,7 @@ public static File getScreenshotFile(String screenshotName) {
124124
throw new RuntimeException(e);
125125
}
126126

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

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

156156
File folder = new File(path);
157157
if (!folder.exists()) {
@@ -182,7 +182,7 @@ public static String getScreenshotAbsolutePath(String screenshotName) {
182182
throw new RuntimeException(e);
183183
}
184184

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

187187
File folder = new File(path);
188188
if (!folder.exists()) {

src/main/java/com/anhtester/helpers/JsonHelpers.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ public class JsonHelpers {
1414
private StringBuffer stringBuffer;
1515
private DocumentContext jsonContext;
1616
private String lines;
17-
private String jsonFilePathDefault = Helpers.getCurrentDir() + "src/test/resources/datajson/store.json";
17+
private String jsonFilePathDefault = SystemHelpers.getCurrentDir() + "src/test/resources/datajson/store.json";
1818

1919
public void setJsonFile(String jsonPath) {
2020
try {
21-
bufferedReader = new BufferedReader(new FileReader(Helpers.getCurrentDir() + jsonPath));
21+
bufferedReader = new BufferedReader(new FileReader(SystemHelpers.getCurrentDir() + jsonPath));
2222
stringBuffer = new StringBuffer();
2323
while ((lines = bufferedReader.readLine()) != null) {
2424
stringBuffer.append(lines);

src/main/java/com/anhtester/helpers/PropertiesHelpers.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static Properties loadAllFiles() {
3434

3535
for (String f : files) {
3636
Properties tempProp = new Properties();
37-
linkFile = Helpers.getCurrentDir() + f;
37+
linkFile = SystemHelpers.getCurrentDir() + f;
3838
file = new FileInputStream(linkFile);
3939
tempProp.load(file);
4040
properties.putAll(tempProp);
@@ -56,7 +56,7 @@ public static Properties getProperties() {
5656
public static void setFile(String relPropertiesFilePath) {
5757
properties = new Properties();
5858
try {
59-
linkFile = Helpers.getCurrentDir() + relPropertiesFilePath;
59+
linkFile = SystemHelpers.getCurrentDir() + relPropertiesFilePath;
6060
file = new FileInputStream(linkFile);
6161
properties.load(file);
6262
file.close();
@@ -68,7 +68,7 @@ public static void setFile(String relPropertiesFilePath) {
6868
public static void setDefaultFile() {
6969
properties = new Properties();
7070
try {
71-
linkFile = Helpers.getCurrentDir() + relPropertiesFilePathDefault;
71+
linkFile = SystemHelpers.getCurrentDir() + relPropertiesFilePathDefault;
7272
file = new FileInputStream(linkFile);
7373
properties.load(file);
7474
file.close();
@@ -82,7 +82,7 @@ public static String getValue(String key) {
8282
try {
8383
if (file == null && properties == null) {
8484
properties = new Properties();
85-
linkFile = Helpers.getCurrentDir() + relPropertiesFilePathDefault;
85+
linkFile = SystemHelpers.getCurrentDir() + relPropertiesFilePathDefault;
8686
file = new FileInputStream(linkFile);
8787
properties.load(file);
8888
file.close();
@@ -101,10 +101,10 @@ public static void setValue(String key, String keyValue) {
101101
try {
102102
if (file == null) {
103103
properties = new Properties();
104-
file = new FileInputStream(Helpers.getCurrentDir() + relPropertiesFilePathDefault);
104+
file = new FileInputStream(SystemHelpers.getCurrentDir() + relPropertiesFilePathDefault);
105105
properties.load(file);
106106
file.close();
107-
out = new FileOutputStream(Helpers.getCurrentDir() + relPropertiesFilePathDefault);
107+
out = new FileOutputStream(SystemHelpers.getCurrentDir() + relPropertiesFilePathDefault);
108108
}
109109
//Write to the same Prop file as the extracted file
110110
out = new FileOutputStream(linkFile);

src/main/java/com/anhtester/helpers/Helpers.java renamed to src/main/java/com/anhtester/helpers/SystemHelpers.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
import java.util.Locale;
1313
import java.util.regex.Pattern;
1414

15-
public final class Helpers {
15+
public final class SystemHelpers {
1616

17-
public Helpers() {
17+
public SystemHelpers() {
1818
super();
1919
}
2020

0 commit comments

Comments
 (0)