oz icon indicating copy to clipboard operation
oz copied to clipboard

Using a Watir Element or Selenium Element as a parent element

Open Castone22 opened this issue 7 years ago • 2 comments

Currently it's possible to define direct driver elements in our page models like so

foo_section = browser.div(id: 'foo')
add_link(:foobar_link, parent: foo_section, id: 'foobar')

Doing so results in an error as currently we assume that the element being passed in as a parent will have #.watir_element defined on it (which watir and selenium elements do not). This is expected behavior and should likely be documented somewhere.

Castone22 avatar Nov 30 '18 15:11 Castone22

Is this need filled with #138 ?

PanoramicPanda avatar Jul 02 '19 17:07 PanoramicPanda

It would be better probably to enforce that a parent here is actually of type CoreElement. We don't want them to be creating watir elements directly.

greenarrowdb avatar Jul 02 '19 17:07 greenarrowdb