Commit fc101a55 authored by YuShijiaCode's avatar YuShijiaCode

update login user

parent 265db36d
...@@ -15,7 +15,7 @@ class Login_Page { ...@@ -15,7 +15,7 @@ class Login_Page {
error_message = '//input[@id="login-password_password"]/../../../../../../following-sibling::div[2]' error_message = '//input[@id="login-password_password"]/../../../../../../following-sibling::div[2]'
user_error_message = '//input[@id="login-with-password_password"]/../../../../../../following-sibling::div[2]' user_error_message = '//input[@id="login-with-password_password"]/../../../../../../following-sibling::div[2]'
// http://unibee:[email protected]/ // http://unibee:[email protected]/
openMerchantUrl = async function (driver, url = 'http://localhost/'){ openMerchantUrl = async function (driver, url = 'http://unibee:[email protected]/'){
console.log("Open URL: " + url); console.log("Open URL: " + url);
await baseStep.access_url(driver,url); await baseStep.access_url(driver,url);
await baseStep.wait(driver, 3000); await baseStep.wait(driver, 3000);
...@@ -23,7 +23,7 @@ class Login_Page { ...@@ -23,7 +23,7 @@ class Login_Page {
console.log("currentUrl: " + currentUrl); console.log("currentUrl: " + currentUrl);
} }
// http://unibee:[email protected]/ // http://unibee:[email protected]/
openUserUrl = async function (driver, url = 'http://localhost:8086/plans'){ openUserUrl = async function (driver, url = 'http://unibee:[email protected]/'){
console.log("Open URL: " + url); console.log("Open URL: " + url);
await baseStep.access_url(driver,url); await baseStep.access_url(driver,url);
await baseStep.wait(driver, 3000); await baseStep.wait(driver, 3000);
......
...@@ -60,9 +60,9 @@ describe('Login in Merchant Portal=> Success', function() { ...@@ -60,9 +60,9 @@ describe('Login in Merchant Portal=> Success', function() {
const currentUrl = await Driver.getCurrentUrl(); const currentUrl = await Driver.getCurrentUrl();
console.log('当前网址:', currentUrl); console.log('当前网址:', currentUrl);
await baseStep.waitUntilElement(Driver, loginPage.email,20000); await baseStep.waitUntilElement(Driver, loginPage.email,20000);
await baseStep.input(Driver, loginPage.email, '[email protected]'); await baseStep.input(Driver, loginPage.email, '[email protected]');
await baseStep.wait(Driver, 2000); await baseStep.wait(Driver, 2000);
await baseStep.input(Driver,loginPage.password, 'changeme'); await baseStep.input(Driver,loginPage.password, 'Aa@666666');
await baseStep.wait(Driver, 2000); await baseStep.wait(Driver, 2000);
await baseStep.screenShot(Driver,savaPath + '/01_login.jpeg'); await baseStep.screenShot(Driver,savaPath + '/01_login.jpeg');
await baseStep.click(Driver, loginPage.submitBtn); await baseStep.click(Driver, loginPage.submitBtn);
...@@ -132,7 +132,7 @@ describe('Login failed with wrong password in Merchant Portal=> Success', functi ...@@ -132,7 +132,7 @@ describe('Login failed with wrong password in Merchant Portal=> Success', functi
const currentUrl = await Driver.getCurrentUrl(); const currentUrl = await Driver.getCurrentUrl();
console.log('当前网址:', currentUrl); console.log('当前网址:', currentUrl);
await baseStep.waitUntilElement(Driver, loginPage.email,20000); await baseStep.waitUntilElement(Driver, loginPage.email,20000);
await baseStep.input(Driver, loginPage.email, '[email protected]'); await baseStep.input(Driver, loginPage.email, '[email protected]');
await baseStep.wait(Driver, 2000); await baseStep.wait(Driver, 2000);
await baseStep.input(Driver,loginPage.password, '123123'); await baseStep.input(Driver,loginPage.password, '123123');
await baseStep.click(Driver, loginPage.submitBtn); await baseStep.click(Driver, loginPage.submitBtn);
......
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