jonhoo / fantoccini

A high-level API for programmatically interacting with web pages through WebDriver.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't get contents of `<title>` without getting outer HTML as well

arctic-hen7 opened this issue · comments

I'm not sure if this is a bug in Fantoccini or WebDriver or geckodriver, but I don't seem to be able to get the contents of a <title> with .text() or .html(true), both return an empty string. Only when getting the outer HTML with .html(false) is something actually returned (including the inner HTML). While not a critical bug, this is quite annoying.

I'm using geckodriver v0.29.1 and Fantoccini v0.17.5, and this can be replicated by getting a title with client.find(Locator::Css("title")) (which returns the element correctly) and using this setup.

Hmm, that definitely seems sketchy. I doubt that it's something fantoccini is doing, since we just forward things directly to webdriver. Does the same thing happen if you try chromedriver instead for example?

Agreed, I'll try it with chromedriver today.

I'm going to close this under the assumption that it's a driver issue.

It was! Sorry, I completely forgot to close this!