const Logger= require('../entity/Logger.js'); const logger=Logger.logger; const tempOutputPath=Logger.tempOutputPath; const key = require('selenium-webdriver').Key; const by = require('selenium-webdriver/lib/by'); const page=require('./Page.js'); const Page=page.Page; const By=by.By; const utils=require('../utils//Utils.js'); const Utils=utils.Utils; const buttonOk=By.xpath("/html/body/div[2]/div/div[3]/button[1]"); const modal=By.className("modal"); const adj=""; const buttonDistribute=By.xpath("//*[contains(text(),'Distribute reserved tokens')]"); const buttonFinalize=By.xpath("//*[contains(text(),'Finalize Crowdsale')]"); const buttonYesFinalize=By.className("swal2-confirm swal2-styled"); const buttonSave=By.className("no_arrow button button_fill"); const warningEndTimeTier1=By.xpath("//*[@id=\"root\"]/div/"+adj+"section/div[3]/div/div[2]/div[2]/div[2]/p[2]"); const warningEndTimeTier2=By.xpath("//*[@id=\"root\"]/div/"+adj+"section/div[4]/div/div[1]/div[2]/div[2]/p[2]"); const warningStartTimeTier2=By.xpath("//*[@id=\"root\"]/div/"+adj+"section/div[4]/div/div[1]/div[2]/div[1]/p[2]"); const warningStartTimeTier1=By.xpath("//*[@id=\"root\"]/div/"+adj+"section/div[4]/div/div[2]/div[2]/div[1]/p[2]"); class ManagePage extends Page { constructor(driver,crowdsale) { super(driver); this.URL; this.name="Manage page: "; this.crowdsale=crowdsale; this.fieldNameTier=[]; this.fieldWalletAddressTier=[]; this.fieldStartTimeTier=[]; this.fieldEndTimeTier=[]; this.fieldRateTier=[]; this.fieldSupplyTier=[]; this.fieldWhAddressTier=[]; this.fieldMinTier=[]; this.fieldMaxTier=[]; this.buttonAddWh=[]; this.buttonDistribute; } async initButtonDistribute() { let locator = buttonDistribute; let arr = await super.findWithWait(locator); this.buttonDistribute=arr[1]; // console.log("LLL buttonDistribute"+ arr.length) ; } async initButtons(){ let locator = By.className("button button_fill button_fill_plus"); let arr = await super.findWithWait(locator); for (let i=0; i9) { amountTiers=2;} if ((arr.length>15)||(arr.length==9)) tierLength=9; for (var i=0;i=limit) { return false; } } while(true); } } module.exports={ ManagePage:ManagePage }