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 buttonContinue=By.xpath("//*[contains(text(),'Continue')]"); const buttonAddTier=By.className("button button_fill_secondary"); const buttonOK=By.className("swal2-confirm swal2-styled"); const fieldWalletAddress=By.id("walletAddress"); const fieldMinCap=By.id("minCap"); let flagCustom=false; let flagWHitelising=false; var COUNT_TIERS=0; class WizardStep3 extends page.Page{ constructor(driver){ super(driver); this.URL; this.tier; this.name="WizardStep3 page: "; this.boxGasPriceSafe; this.boxGasPriceNormal; this.boxGasPriceFast; this.boxGasPriceCustom; this.boxWhitelistingYes; this.boxWhitelistingNo; this.fieldGasPriceCustom ; this.fieldWalletAddress; this.fieldMinCap; this.title="CROWDSALE SETUP"; this.warningWalletAddress; this.warningCustomGasPrice; this.warningMincap; } static getFlagCustom(){return flagCustom;} static getFlagWHitelising(){return flagWHitelising;} static setFlagCustom(value){flagCustom=value;} static setFlagWHitelising(value){flagWHitelising=value;} static getCountTiers(){return COUNT_TIERS} static setCountTiers(value){COUNT_TIERS=value} async printWarnings(){ var arr=await this.initWarnings(); for (var i=0;i0)return true; else return false; } async getFieldWalletAddress(){ logger.info(this.name+"getFieldWalletAddress: "); try { await this.init(); let result = super.getAttribute(fieldWalletAddress, "value"); return result; } catch (err) { logger.info(err); return ""; } } async clickButtonOk(){ logger.info("Confirm popup"); await super.clickWithWait(buttonOK); } async isPresentButtonContinue(){ var b=await super.isElementPresent(buttonContinue); logger.info(this.name+": is present button Continue: "+b); return b; } } module.exports.WizardStep3=WizardStep3;