Hi I am trying to use C# selenium to get a youtube video title. These won't work. I already tried getting .Text from other elements and they work fine. So I narrowed down to these lines which I think is problematic. Help is very much appreciated. Will love to know where I went wrong.
var title = driver.FindElement(By.Id("title")).FindElement(By.ClassName("style-scope ytd-watch-metadata")).Text;
var title = driver.FindElement(By.CssSelector("h1.title yt-formatted-string")).Text;