Sure, this is the step definitions:
Given("The application is up and running", function (){
Browsers.Item(btChrome).Navigate("https://crpvms1wtcqa.corp.nychhc.org:911/Account/LogOn?ReturnUrl=%2fAccount%2fExpire%3freturnUrl%3d%2fAccount%2fLogOn&returnUrl=/Account/LogOn");
Aliases.browser.BrowserWindow.Maximize();
});
When("The User enters valid {arg}", function (param1){
let browser = Aliases.browser;
browser.BrowserWindow.Maximize();
let textbox = browser.pageLogon2.fieldsetLogOntoTheWorldTradeCent.textboxUsername;
textbox.Click();
textbox.SetText("<username>");
browser = Aliases.browser;
browser.BrowserWindow.Maximize();
let passwordBox = browser.pageLogon2.fieldsetLogOntoTheWorldTradeCent.passwordboxPassword;
passwordBox.Click();
passwordBox.SetText(Project.Variables.Password6);
});
Then("The user lands on the homepage of the WTC Hub", function (){
let browser = Aliases.browser;
browser.BrowserWindow.Maximize();
browser.pageLogon2.fieldsetLogOntoTheWorldTradeCent.submitbuttonLogin.ClickButton();
});
Given("some precondition", function (){
browserWindow = Aliases.browser.BrowserWindow2;
browserWindow.Click(246, 97);
Browsers.Item(btChrome).Navigate("https://crpvms1wtcqa.corp.nychhc.org:911/Account/LogOn?ReturnUrl=%2f");
browserWindow.Position(2015, 3, 1900, 1020);
});
When("an action is performed", function (){
let browser = Aliases.browser;
browser.BrowserWindow2.Position(2015, 3, 1900, 1020);
let textbox = browser.pageLogon2.fieldsetLogOntoTheWorldTradeCent;
textbox.textboxUsername.SetText("hydem");
let passwordBox = textbox.passwordboxPassword;
passwordBox.Click();
passwordBox.SetText(Project.Variables.Password7);
});
Then("validate a condition", function (){
let browser = Aliases.browser;
browser.pageLogon2.fieldsetLogOntoTheWorldTradeCent.submitbuttonLogin.ClickButton();
browser.BrowserWindow3.Maximize();
browser.pageCrpvms1wtcqaCorpNychhcOrg911.formLogoff.submitbuttonLogOff.ClickButton();
});