Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Glamira Automation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dung automation
Glamira Automation
Commits
7ff7baa3
Commit
7ff7baa3
authored
Oct 12, 2022
by
Bui Tien Vu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
0eef0d8e
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
279 additions
and
0 deletions
+279
-0
pom.xml
pom.xml
+41
-0
src/main/java/Page/Header_Page.java
src/main/java/Page/Header_Page.java
+13
-0
src/main/java/Page/ListingPage.java
src/main/java/Page/ListingPage.java
+13
-0
src/main/java/Page/LogIn_LogOut_Page.java
src/main/java/Page/LogIn_LogOut_Page.java
+13
-0
src/main/java/Page/ProductDetail_Page.java
src/main/java/Page/ProductDetail_Page.java
+13
-0
src/main/java/Page_Element/Header_Element.java
src/main/java/Page_Element/Header_Element.java
+13
-0
src/main/java/Page_Element/ListingPage_Element.java
src/main/java/Page_Element/ListingPage_Element.java
+17
-0
src/main/java/Page_Element/LogIn_LogOut_Element.java
src/main/java/Page_Element/LogIn_LogOut_Element.java
+13
-0
src/main/java/Page_Element/ProductDetail_Element.java
src/main/java/Page_Element/ProductDetail_Element.java
+13
-0
src/main/java/Page_Lib/App_Lib.java
src/main/java/Page_Lib/App_Lib.java
+23
-0
src/main/java/Page_Lib/Flow_Lib.java
src/main/java/Page_Lib/Flow_Lib.java
+25
-0
src/main/java/Page_Lib/Page_Lib.java
src/main/java/Page_Lib/Page_Lib.java
+36
-0
src/test/java/Common_Page/AbstractBase_Test.java
src/test/java/Common_Page/AbstractBase_Test.java
+30
-0
src/test/java/Tests/Header_Test.java
src/test/java/Tests/Header_Test.java
+4
-0
src/test/java/Tests/ListingPage_Test.java
src/test/java/Tests/ListingPage_Test.java
+4
-0
src/test/java/Tests/LogIn_LogOut_Test.java
src/test/java/Tests/LogIn_LogOut_Test.java
+4
-0
src/test/java/Tests/ProductDetail_Test.java
src/test/java/Tests/ProductDetail_Test.java
+4
-0
No files found.
pom.xml
0 → 100644
View file @
7ff7baa3
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.example
</groupId>
<artifactId>
Glamira
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<properties>
<maven.compiler.source>
11
</maven.compiler.source>
<maven.compiler.target>
11
</maven.compiler.target>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>
org.seleniumhq.selenium
</groupId>
<artifactId>
selenium-java
</artifactId>
<version>
4.5.0
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.13.2
</version>
</dependency>
<dependency>
<groupId>
org.testng
</groupId>
<artifactId>
testng
</artifactId>
<version>
7.6.1
</version>
</dependency>
<dependency>
<groupId>
io.github.bonigarcia
</groupId>
<artifactId>
webdrivermanager
</artifactId>
<version>
5.3.0
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
src/main/java/Page/Header_Page.java
0 → 100644
View file @
7ff7baa3
package
Page
;
import
org.openqa.selenium.WebDriver
;
public
class
Header_Page
{
WebDriver
driver
;
public
Header_Page
(
WebDriver
driver
)
{
this
.
driver
=
driver
;
}
}
src/main/java/Page/ListingPage.java
0 → 100644
View file @
7ff7baa3
package
Page
;
import
org.openqa.selenium.WebDriver
;
public
class
ListingPage
{
WebDriver
driver
;
public
ListingPage
(
WebDriver
driver
)
{
this
.
driver
=
driver
;
}
}
src/main/java/Page/LogIn_LogOut_Page.java
0 → 100644
View file @
7ff7baa3
package
Page
;
import
org.openqa.selenium.WebDriver
;
public
class
LogIn_LogOut_Page
{
WebDriver
driver
;
public
LogIn_LogOut_Page
(
WebDriver
driver
)
{
this
.
driver
=
driver
;
}
}
src/main/java/Page/ProductDetail_Page.java
0 → 100644
View file @
7ff7baa3
package
Page
;
import
org.openqa.selenium.WebDriver
;
public
class
ProductDetail_Page
{
WebDriver
driver
;
public
ProductDetail_Page
(
WebDriver
driver
)
{
this
.
driver
=
driver
;
}
}
src/main/java/Page_Element/Header_Element.java
0 → 100644
View file @
7ff7baa3
package
Page_Element
;
import
org.openqa.selenium.WebDriver
;
import
org.openqa.selenium.support.PageFactory
;
public
class
Header_Element
{
WebDriver
driver
;
public
Header_Element
(
WebDriver
driver
)
{
this
.
driver
=
driver
;
PageFactory
.
initElements
(
driver
,
this
);
}
}
src/main/java/Page_Element/ListingPage_Element.java
0 → 100644
View file @
7ff7baa3
package
Page_Element
;
import
org.openqa.selenium.WebDriver
;
import
org.openqa.selenium.WebElement
;
import
org.openqa.selenium.support.FindBy
;
import
org.openqa.selenium.support.PageFactory
;
import
java.util.List
;
public
class
ListingPage_Element
{
WebDriver
driver
;
public
ListingPage_Element
(
WebDriver
driver
)
{
this
.
driver
=
driver
;
PageFactory
.
initElements
(
driver
,
this
);
}
}
src/main/java/Page_Element/LogIn_LogOut_Element.java
0 → 100644
View file @
7ff7baa3
package
Page_Element
;
import
org.openqa.selenium.WebDriver
;
import
org.openqa.selenium.support.PageFactory
;
public
class
LogIn_LogOut_Element
{
WebDriver
driver
;
public
LogIn_LogOut_Element
(
WebDriver
driver
)
{
this
.
driver
=
driver
;
PageFactory
.
initElements
(
driver
,
this
);
}
}
src/main/java/Page_Element/ProductDetail_Element.java
0 → 100644
View file @
7ff7baa3
package
Page_Element
;
import
org.openqa.selenium.WebDriver
;
import
org.openqa.selenium.support.PageFactory
;
public
class
ProductDetail_Element
{
WebDriver
driver
;
public
ProductDetail_Element
(
WebDriver
driver
)
{
this
.
driver
=
driver
;
PageFactory
.
initElements
(
driver
,
this
);
}
}
src/main/java/Page_Lib/App_Lib.java
0 → 100644
View file @
7ff7baa3
package
Page_Lib
;
import
org.openqa.selenium.WebDriver
;
public
class
App_Lib
{
private
WebDriver
driver
;
private
Page_Lib
page
;
private
Flow_Lib
flow
;
public
App_Lib
(
WebDriver
driver
)
{
this
.
driver
=
driver
;
page
=
new
Page_Lib
(
this
.
driver
);
flow
=
new
Flow_Lib
(
this
.
driver
);
}
public
Page_Lib
Pages
()
{
return
page
;
}
public
Flow_Lib
Flow
()
{
return
flow
;
}
}
src/main/java/Page_Lib/Flow_Lib.java
0 → 100644
View file @
7ff7baa3
package
Page_Lib
;
import
io.github.bonigarcia.wdm.WebDriverManager
;
import
org.openqa.selenium.WebDriver
;
public
class
Flow_Lib
{
private
WebDriver
driver
;
public
Flow_Lib
(
WebDriver
driver
)
{
this
.
driver
=
driver
;
}
public
void
navigateToUrl
(
String
url
)
{
this
.
driver
.
get
(
url
);
}
public
String
getCurrentPageUrl
()
{
return
this
.
driver
.
getCurrentUrl
();
}
public
String
getCurrentPageTitle
()
{
return
this
.
driver
.
getTitle
();
}
}
src/main/java/Page_Lib/Page_Lib.java
0 → 100644
View file @
7ff7baa3
package
Page_Lib
;
import
Page.Header_Page
;
import
Page.LogIn_LogOut_Page
;
import
Page.ProductDetail_Page
;
import
Page_Element.ListingPage_Element
;
import
org.openqa.selenium.WebDriver
;
public
class
Page_Lib
{
private
WebDriver
driver
;
private
Header_Page
headerPage
;
private
LogIn_LogOut_Page
logInOutPage
;
private
ProductDetail_Page
productDetailPage
;
private
ListingPage_Element
listingPage
;
public
Page_Lib
(
WebDriver
driver
)
{
this
.
driver
=
driver
;
listingPage
=
new
ListingPage_Element
(
this
.
driver
);
headerPage
=
new
Header_Page
(
this
.
driver
);
logInOutPage
=
new
LogIn_LogOut_Page
(
this
.
driver
);
productDetailPage
=
new
ProductDetail_Page
(
this
.
driver
);
}
public
Header_Page
HeaderPage
()
{
return
headerPage
;
}
public
LogIn_LogOut_Page
LogInOutage
()
{
return
logInOutPage
;
}
public
ProductDetail_Page
ProductDetailPage
()
{
return
productDetailPage
;
}
public
ListingPage_Element
ListingPage
(){
return
listingPage
;
}
}
src/test/java/Common_Page/AbstractBase_Test.java
0 → 100644
View file @
7ff7baa3
package
Common_Page
;
import
Page_Lib.App_Lib
;
import
io.github.bonigarcia.wdm.WebDriverManager
;
import
org.openqa.selenium.WebDriver
;
import
org.openqa.selenium.chrome.ChromeDriver
;
import
org.testng.annotations.AfterTest
;
import
org.testng.annotations.BeforeTest
;
public
class
AbstractBase_Test
{
WebDriver
driver
;
private
App_Lib
app
;
@BeforeTest
public
void
setUp
()
throws
Exception
{
WebDriverManager
.
chromedriver
().
setup
();
driver
=
new
ChromeDriver
();
app
=
new
App_Lib
(
driver
);
}
@AfterTest
public
void
tearDown
()
{
driver
.
close
();
}
public
App_Lib
App
()
{
return
app
;
}
}
src/test/java/Tests/Header_Test.java
0 → 100644
View file @
7ff7baa3
package
Tests
;
public
class
Header_Test
{
}
src/test/java/Tests/ListingPage_Test.java
0 → 100644
View file @
7ff7baa3
package
Tests
;
public
class
ListingPage_Test
{
}
src/test/java/Tests/LogIn_LogOut_Test.java
0 → 100644
View file @
7ff7baa3
package
Tests
;
public
class
LogIn_LogOut_Test
{
}
src/test/java/Tests/ProductDetail_Test.java
0 → 100644
View file @
7ff7baa3
package
Tests
;
public
class
ProductDetail_Test
{
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment