uiautomator icon indicating copy to clipboard operation
uiautomator copied to clipboard

Handlers are not calling for 'exists'

Open siva-kranthi opened this issue 10 years ago • 3 comments

Handler is not calling if UI obj is not found using exists, but works fine with click. But watcher works fine for both.

siva-kranthi avatar Jun 27 '14 07:06 siva-kranthi

@xiaocong Patched it using below code @767

    def progressive_exists(self, exe_handlers=True):
        '''check if the object exists in current window.'''
        if exe_handlers and not self.jsonrpc.exist(self.selector):
            # any handler returns True will break the left handlers
            any(handler(self.device.server.handlers.get('device', None)) for handler in self.device.server.handlers['handlers'])
            self.progressive_exists(exe_handlers=False)

        return self.jsonrpc.exist(self.selector)

    @property
    def exists(self):
        return self.progressive_exists()

siva-kranthi avatar Jun 27 '14 10:06 siva-kranthi

I will check it. Thank you.

xiaocong avatar Jul 02 '14 12:07 xiaocong

Any chance of fixing this?

zgoda-mobica avatar May 25 '18 13:05 zgoda-mobica