This is the code:
driver.get(url).then(function(){
txtFnn = driver.findElement(webdriver.By.xpath(xpath));
return txtFnn;
}).then(function(){
txtFnn.sendkeys("12345678");
})
Error:
TypeError: txtFnn.sendkeys is not a function