Skip to content

Get wrong browser object for non top view in hierarchy #132

@oshtaier

Description

@oshtaier

What we do:

class AirgunBrowser(Browser):
    def wait_for_element(...):
        return super(AirgunBrowser, self).wait_for_element(...)

Then we do:

class MyView(View):
    def is_displayed(self):
        return self.browser.wait_for_element(...)

class MyOtherView(View):
    class MyTab(Tab):
        view = MyView()

In result when we call view we have wrong browser object type in its is_displayed method:
self.browser == BrowserParentWrapper not AirgunBrowser that will get us to
super(type, obj): obj must be an instance or subtype of type exception in wait_for_element method

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions