3

I'm writing test using Watir-Webdriver and phantomjs and I've got an issue with iframes. I'm trying to get an element with the following code:

browser.frame(:index => 0).div(:id, "wrapper").exists?

and when I'm using phantomjs, it raise an error:

NameError: uninitialized constant Watir::FramedDriver::UnknownFrameException

but when I'm using chrome driver, the code above works properly and returns "true" value.

Any ideas how can I fix it? Or maybe there is any other way to get this element using phantomjs? Any help will be appreciated. Thanks!

Željko Filipin
  • 56,372
  • 28
  • 94
  • 125
corday
  • 31
  • 2

1 Answers1

3

My guess is that ghostdriver does not have support for frames. I could not find an open issue related to frames in it's bug tracker: https://github.com/detro/ghostdriver/issues If you think it is a bug in ghostdriver, you should report it there.

Željko Filipin
  • 56,372
  • 28
  • 94
  • 125
  • Okay, so I'll report this issue. Thank you for the really quick answer. – corday Mar 07 '13 at 15:24
  • 2
    It should work properly. Only frame spec which has been guarded in watirspec is related with nested frames (https://github.com/watir/watirspec/blob/master/frame_spec.rb#L67-L75). Other specs are passing. So it seems to be something more specific. – Jarmo Pertman Mar 08 '13 at 16:39