Hi, yes you are quite right about all this.
I suppose FindCss could look at the type of element it has found and if it is an iframe then treat it the same way as FindFrame. Alternately I suppose we could make it possible to pass a CSS selector to FindFrame, but then I suppose we ought to do that everywhere for consistency.
How does the first option sound - that way it would just have worked for you? It's a pretty simple change.
To work around in the meantime you could always call into selenium by casting the BrowserSession.Native to IWebDriver and doing the switching yourself like in the code you reference below, but this would be quite ugly and you'd have to manage switching back and forth which is hard and Coypu does this for you normally.
Assuming you can't change the markup, probably the easiest short-term hack (so long as you don't need to test with noscript) would be to hack an id onto the element with some javascript like so:
var tempId = Guid.NewGuid().ToString();
browserSession.ExecuteScript("document.querySelector('iframe.my-class-name').id = '" + tempId + "';");
var myFrame = browserSession.FindFrame(tempId);
I will do what I suggested though so that it just works with FindCss and FindId and reply to this thread when it's ready.
Cheers,
Adrian