refactor WizardWelcome.js

This commit is contained in:
dennis00010011b 2018-05-01 11:12:44 -07:00
parent e23ee2d4d2
commit 661b19b407
2 changed files with 14 additions and 19 deletions

View File

@ -1,22 +1,14 @@
const Logger= require('../entity/Logger.js');
const logger=Logger.logger;
const tempOutputPath=Logger.tempOutputPath;
const page=require('./Page.js');
const webdriver = require('selenium-webdriver'),
chrome = require('selenium-webdriver/chrome'),
firefox = require('selenium-webdriver/firefox'),
by = require('selenium-webdriver/lib/by');
const By=by.By;
const logger= require('../entity/Logger.js').logger;
const page=require('./Page.js').Page;
const By = require('selenium-webdriver/lib/by').By;
const buttonContinue= By.className("button button_fill");
class WizardStep1 extends page.Page{
constructor(driver){
super(driver);
this.URL;
this.name="WizardStep1 page: ";
this.name = "WizardStep1 page: ";
this.title="CROWDSALE CONTRACT";
}

View File

@ -9,36 +9,39 @@ class WizardWelcome extends page.Page{
constructor(driver,URL){
super(driver);
this.URL=URL;
this.name="WizardWelcome page: ";
this.URL = URL;
this.name = "WizardWelcome page: ";
}
async clickButtonNewCrowdsale(){
logger.info(this.name+"button NewCrowdsale");
logger.info(this.name + "button NewCrowdsale");
return await super.clickWithWait(buttonNewCrowdsale);
}
async clickButtonChooseContract(){
logger.info(this.name+"button ChooseContract");
logger.info(this.name + "button ChooseContract");
return await super.clickWithWait(buttonChooseContract);
}
async open() {
logger.info(this.name+": open");
await super.open(this.URL);
logger.info(this.name + ": open");
await super.open(this.URL);
return await super.getUrl();
}
async isPresentButtonNewCrowdsale() {
logger.info(this.name + ": isPresentButtonNewCrowdsale");
return await super.isElementDisplayed(buttonNewCrowdsale);
}
async isPresentButtonChooseContract() {
logger.info(this.name + ": isPresentButtonChooseContract");
return await super.isElementDisplayed(buttonChooseContract);
}
async isPage(){
return await super.isElementDisplayed(buttonNewCrowdsale) && await super.isElementDisplayed(buttonChooseContract);
return await super.isElementDisplayed(buttonNewCrowdsale) &&
await super.isElementDisplayed(buttonChooseContract);
}
}
module.exports.WizardWelcome=WizardWelcome;