Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
test-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马博
test-platform
Commits
81dea709
Commit
81dea709
authored
Jun 03, 2019
by
马博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
8947c897
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
0 deletions
+75
-0
CmsLoginPage.java
src/test/java/ui/service/CmsLoginPage.java
+40
-0
DafuwengLogin.java
src/test/java/ui/service/DafuwengLogin.java
+35
-0
No files found.
src/test/java/ui/service/CmsLoginPage.java
0 → 100644
View file @
81dea709
package
ui
.
service
;
import
base.DuibaBaseUi
;
import
http.service.Authorization
;
import
org.openqa.selenium.Cookie
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
static
com
.
codeborne
.
selenide
.
Selenide
.
open
;
/**
* Created by mabo on 2019/4/16
*/
@Service
public
class
CmsLoginPage
{
@Autowired
Authorization
authorization
;
public
void
init
(
String
account
,
DuibaBaseUi
father
)
throws
Exception
{
father
.
open
(
"http://hd.dlp.duibatest.com.cn"
);
father
.
switchChrome
();
open
(
"http://hd.dlp.duibatest.com.cn"
);
Map
<
String
,
String
>
map
=
authorization
.
hdLoginCommonNew
(
account
);
for
(
String
key:
map
.
keySet
()
)
{
father
.
driver
.
manage
().
addCookie
(
new
Cookie
(
key
,
map
.
get
(
key
)));
}
open
(
"http://hd.dlp.duibatest.com.cn/static/index?appId=22563#/creditShop/creditShopSub/creditShopRenovation/renovation"
);
father
.
clickByClass
(
"el-dialog__headerbtn"
);
father
.
clickByClass
(
"iconfont-handle handle-xiangxiazhankai"
);
father
.
sleep
(
2
);
}
}
src/test/java/ui/service/DafuwengLogin.java
0 → 100644
View file @
81dea709
package
ui
.
service
;
import
base.DuibaBaseUi
;
import
http.service.Authorization
;
import
org.openqa.selenium.Cookie
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
/**
* Created by mabo on 2019/4/17
*/
@Service
public
class
DafuwengLogin
{
@Autowired
Authorization
authorization
;
public
void
init
(
int
uid
,
String
url
,
DuibaBaseUi
father
){
father
.
switchChrome
();
father
.
open
(
url
);
Map
<
String
,
String
>
map
=
authorization
.
dafuwengLogin
(
uid
);
for
(
String
key:
map
.
keySet
()
)
{
father
.
driver
.
manage
().
addCookie
(
new
Cookie
(
key
,
map
.
get
(
key
)));
}
father
.
open
(
url
);
}
}
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