I want to call a function after selenium sees and get the text of a link on page,
driver.get("https://example.com/");
driver.findElement(By.id('inbox-id')).getText().then(function(gm){
address = gm + "@sharklasers.com";
var output = new Buffer(address, 'hex');
console.log(output);
mailExistsCheck();
var query = driver.wait(until.elementLocated(By.xpath("//*[contains(text(), 'confirm@ksmobile.com ')]")));
query.click();
var query2 = driver.wait(until.elementLocated(By.partialLinkText("iptlogin")));
query2.getText();
var target = query2.getText();
After selenium finds this driver.wait(until.elementLocated(By.partialLinkText("iptlogin"))); I want to start a function called activateMail(target).
i Need to do something simular to this
var link = target.includes("iptlogin");
if (link = true) {
activateMail(target);
console.log("True");
}