Commit 818069ce authored by 马博's avatar 马博

数据库账号密码加密,ui更新

parent 08053af5
......@@ -7,7 +7,7 @@ import org.apache.commons.dbcp2.BasicDataSource;
* Created by mabo on 2018/12/27
*/
public class DataSource extends BasicDataSource {
private String key = "qwertyuiop";
private String key = "CNxgrtFG2nYQUfu";
@Override
public void setPassword(String password) {
password = BlowfishUtils.decryptBlowfish(password,key);
......@@ -22,12 +22,12 @@ public class DataSource extends BasicDataSource {
}
public static void main(String[] args) {
String s = BlowfishUtils.encryptBlowfish("svbP3KUw2PurAnBb2rbs3vohF","qwertyuiop");
String s = BlowfishUtils.encryptBlowfish("duiba","CNxgrtFG2nYQUfu");
System.out.println(s);
//duiba_test
//svbP3KUw2PurAnBb2rbs3vohF
s = BlowfishUtils.decryptBlowfish(s,"qwertyuiop");
s = BlowfishUtils.decryptBlowfish(s,"CNxgrtFG2nYQUfu");
System.out.println(s);
}
......
......@@ -120,7 +120,7 @@ public class DuibaBaseUi extends DuibaBase{
int i=5;
while(i>0){
try {
$(By.xpath(xpath)).click();
driver.findElementByXPath(xpath).click();
logger.info("ByXpath:"+xpath+" click");
return;
} catch (Exception e) {
......
......@@ -32,11 +32,12 @@ public class 优惠券_Activity_ui extends DuibaBaseUi{
//用户登陆,app 13193311111
new MoblieLogin("5074",this);
//手机端楼层
new HomePage("ui自动化-活动工具-优惠券",this);
new HomePage("ui自动化-砸彩蛋-优惠券",this);
new Activity_egg_Page(null,this);
sleep(2);
clickByClass("J_gotoDetail logandgo");
new Activity_egg_Page("查看详情",this);
sleep(2);
Assert.assertTrue(isExistByText("ui自动化-优惠券(活动)"));
Assert.assertTrue(isExistByText("券码:"));
......
......@@ -6,6 +6,7 @@ import org.testng.annotations.Test;
import ui.service.Activity_egg_Page;
import ui.service.HomePage;
import ui.service.MoblieLogin;
import ui.service.TakePrizeNewPage;
import static com.codeborne.selenide.Selenide.open;
......@@ -19,13 +20,19 @@ public class 实物_Activity_ui extends DuibaBaseUi{
new MoblieLogin("5074",this);
//手机端楼层
new HomePage("ui自动化-活动工具-实物",this);
new HomePage("ui自动化-砸彩蛋-实物",this);
new Activity_egg_Page(null,this);
new Activity_egg_Page("立即领奖",this);
new TakePrizeNewPage("马上领取",this);
sleep(2);
clickByClass("J_gotoDetail logandgo");
Assert.assertTrue(isExistByText("恭喜您,中奖啦"),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("收货人:uitest  "),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("13111133322"),"出奖弹层校验失败");//北京市北京市东城区东华门街道test
Assert.assertTrue(isExistByText("北京市北京市东城区东华门街道test "),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("待发货"),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("ui自动化-实物(活动)"),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("订单来源:抽奖"),"出奖弹层校验失败");
}
}
......@@ -18,12 +18,19 @@ public class 支付宝_Activity_ui extends DuibaBaseUi{
new MoblieLogin("5074",this);
//手机端楼层
new HomePage("ui自动化-活动工具-支付宝",this);
new HomePage("ui自动化-砸彩蛋-支付宝",this);
new Activity_egg_Page(null,this);
new Activity_egg_Page("立即领奖",this);
sleep(2);
clickByClass("J_gotoDetail logandgo");
clickByTextEqual("马上领取");
clickByTextEqual("确定");
Assert.assertTrue(isExistByText("恭喜您,中奖啦"),"出奖弹层校验失败");
sleep(5);
Assert.assertTrue(isExistByText("恭喜您兑换成功"),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("充值帐号:"),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("peeulk6392@sandbox.com"),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("订单状态:"),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("成功"),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("订单编号:"),"出奖弹层校验失败");
}
}
......@@ -18,13 +18,18 @@ public class 虚拟商品_Activity_ui extends DuibaBaseUi{
new MoblieLogin("5074",this);
//手机端楼层
new HomePage("ui自动化-活动工具-支付宝",this);
new HomePage("ui自动化-砸彩蛋-虚拟商品",this);
new Activity_egg_Page(null,this);
sleep(2);
new Activity_egg_Page("查看奖品",this);
Assert.assertTrue(isExistByText("恭喜您,中奖啦"),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("ui自动化-活动工具-虚拟商品"),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("已领奖"),"出奖弹层校验失败");
Assert.assertTrue(isExistByText("\n" +
"\t\t\tui自动化-活动工具-虚拟商品-详细说明\n" +
"\t\t"),"出奖弹层校验失败");
}
}
......@@ -40,7 +40,7 @@ public class 实物_ExchangeTest_ui extends DuibaBaseUi{
Assert.assertTrue(isExistByText("待发货"));
Assert.assertTrue(isExistByText("收货人:uitest  "));
Assert.assertTrue(isExistByText("13111133322"));
Assert.assertTrue(isExistByText("北京东城区东华门街道test "));
Assert.assertTrue(isExistByText("北京市北京市东城区东华门街道test "));
Assert.assertTrue(isExistByText("ui自动化-实物"));
Assert.assertTrue(isExistByText("\n" +
" ui自动化-实物-待发货文案\n" +
......
......@@ -7,9 +7,12 @@ import base.DuibaBaseUi;
*/
public class Activity_egg_Page {
public Activity_egg_Page(String name, DuibaBaseUi father) throws Exception {
father.clickByClass("egg jump");
if(name!=null) father.clickByTextEqual(name);
father.sleep(3);
father.clickByClass("egg");
if(name!=null)father.clickByTextEqual(name);
}
}
......@@ -22,8 +22,8 @@ manager.host = mng.duibatest.com.cn
trade.host = activity.m.duibatest.com.cn
//\u6570\u636E\u5E93\u914D\u7F6E
db.name = ELXEVaFBmUzjzP
db.password= 2jx72wjghKSJw17hif9nmKg3FU4vBCFwgy1
db.name = FjrtzzH
db.password= 2Fe36uDap8TMqtfzob3f1u8r2aK8qjdnwPP
db.url = jdbc:mysql://47.97.127.67:13001/?tinyInt1isBit=false
db.driver= com.mysql.cj.jdbc.Driver
db.maxtotal = 6
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment