OzFramework / oz

Oz is a behavioral web-ui testing framework developed to reduce test maintenance by using a predictive model rather than a scriptive model when writing tests.
Apache License 2.0
23 stars 7 forks source link

Using a Watir Element or Selenium Element as a parent element #137

Open Castone22 opened 5 years ago

Castone22 commented 5 years ago

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.

PanoramicPanda commented 5 years ago

Is this need filled with #138 ?

greenarrowdb commented 5 years ago

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.