TypeError: Failed to execute 'createNSResolver' on 'Document': parameter 1 is not of type 'Node'
Pretty sure this is this issue here: https://code.google.com/p/selenium/issues/detail?id=8600
And it is fixed as of Selenium 2.46.0. I haven't seen the error since moving.
Add a line to handle the exception thrown. Seems like the error halts the test. This has nothing to do with the locator, or iframe.Try to wrap your method in rescue clause:
begin {your method}rescue Selenium::WebDriver::Error::InvalidSelectorErrorend