Unfortunately I did not find any existing solution for my problem on stackoverflow. So, can someone help.
I want to get the text of an html-element. I tried this:
var element = driver.findElement(webdriver.By.className("credits")).getText();
console.log(element);
Unfortunately this did not work so far.
var element = driver.findElement(webdriver.By.className("credits")).innerHTMLawaitif you are an async function.