2018-03-28 22:04:59 +00:00
|
|
|
import {When} from "cucumber";
|
2017-07-26 21:45:26 +00:00
|
|
|
import seleniumWebdriver = require("selenium-webdriver");
|
|
|
|
import Assert = require("assert");
|
|
|
|
import Fs = require("fs");
|
|
|
|
|
2018-03-28 22:04:59 +00:00
|
|
|
When("I click on the link {string}", function (text: string) {
|
|
|
|
return this.driver.findElement(seleniumWebdriver.By.linkText(text)).click();
|
|
|
|
});
|
2017-07-26 21:45:26 +00:00
|
|
|
|
2018-03-28 22:04:59 +00:00
|
|
|
When("I click on the link of the email", function () {
|
|
|
|
const that = this;
|
|
|
|
return this.retrieveLatestMail()
|
|
|
|
.then(function (link: string) {
|
|
|
|
return that.driver.get(link);
|
|
|
|
});
|
2017-07-26 21:45:26 +00:00
|
|
|
});
|