Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to listen for navigator events #585

Closed
leonard84 opened this issue Jun 3, 2019 · 3 comments
Closed

Add a way to listen for navigator events #585

leonard84 opened this issue Jun 3, 2019 · 3 comments
Assignees
Milestone

Comments

@leonard84
Copy link

We currently use Groovy MOP interceptor magic to intercept calls to click, sendKeys, at and value, in order to record a screenshot before and after a click, as well as which element was acted upon.

While it certainly works, it would be better to have an officially supported way of hooking into these events.

@erdi
Copy link
Member

erdi commented Sep 6, 2019

Hey @leonard84, I'm currently working on this feature request. Would you please clarify why you are intercepting calls to at? Is it to act on page changes (as in "Page change listening") or do you actually need a callback before and after at checking for a page occurs? If it's the latter we could introduce a onAtCheckFailure which would allow users to implement whatever additional reporting they'd like to have on at check failures rendering #584 redundant.

@erdi
Copy link
Member

erdi commented Sep 6, 2019

@leonard84, FYI, I've extracted the bit about at into #590 as it doesn't have much to do with Navigator, really.

@erdi erdi self-assigned this Sep 6, 2019
@erdi erdi added this to the 3.1 milestone Sep 6, 2019
@aptester
Copy link

@erdi I would like to use the hooking mechanism requested by @leonard84 as well. Unlike @leonard84, I haven't figured out how to get Interceptor magic working to intercept those methods but as an intermediate step have defined a custom navigator which overrides those methods in the Navigator class. But with my approach, TemplateDerivedPageContent events can't be intercepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants