Skip to content

Java. Event firing: improvements and new features #1034

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

Closed

Conversation

TikhomirovSergey
Copy link
Contributor

@TikhomirovSergey TikhomirovSergey commented Sep 14, 2015

Problems

  • Current design doesn't allow end user to log events optionally. E.g.
    if they want to log only searchings or searchings and navigation then
    they are forced to leave unimplemented methods in their code
  • Current design doesn't allow to make any extension without backward
    compatibility problems because each new method should be implemented or
    left empty
  • There are some issues with the logging of thrown exceptions

What has been done

  • WebDriverEvent listener was separated to few interfaces. It is still
    here and aggretes them (in order to support backward compatibility)
  • New listeners were added
  • EventFiringWebdraver was redesigned. The ability to use listeners
    optionally is provided now

Warning!!! There is an issue of backward compatility. Users will face it
if they directly use such classes as EventFiringKeyboard,
EventFiringMouse, EventFiringTouch. But I hope there not many cases and
it is not the critical issue.


This change is Reviewable

@ddavison ddavison added Z-awaiting review Archived: use GitHub review assignments C-java Java Bindings labels Sep 15, 2015
@@ -170,9 +216,9 @@ public String getTitle() {
}

public List<WebElement> findElements(By by) {
dispatcher.beforeFindBy(by, null, driver);
castDispatcher(SearchingEventListener.class).beforeFindBy(by, null, driver);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some spacing issues.

@TikhomirovSergey
Copy link
Contributor Author

@bootstraponline format issues were fixed

@TikhomirovSergey TikhomirovSergey force-pushed the event-firing-java branch 2 times, most recently from 2e91d4b to efc9a26 Compare September 16, 2015 16:06
@bootstraponline
Copy link
Contributor

👍

Problems
- Current design doesn't allow end user to log events optionally. E.g. if they want to log only searchings or searchings and navigation then they
are forced to leave unimplemented methods in their code
- Current design doesn't allow to make any extension without backward compatibility problems because each new method should be implemented or left empty
- There are some issue with the logging of thrown exceptions
What has been done
- WebDriverEvent listener was separated to few interfaces. It is still here and aggretes them (in order to support backward compatibility)
- New listeners were added
- EventFiringWebdraver was redesigned. The ability to use listeners optionally is provided now
Warning!!! There is an issue of backward compatility. Users will face it
if they directly use such classes as EventFiringKeyboard,
EventFiringMouse, EventFiringTouch. But I hope there not many cases and
it is not the critical issue.
@elbaloo
Copy link

elbaloo commented Dec 6, 2016

Any interest on move this forward?
Just glanced at it and noticed lack of tests and that a listener for alerts has been already implemented.

@CLAassistant
Copy link

CLAassistant commented Nov 23, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@diemol diemol closed this Jul 12, 2020
@diemol diemol reopened this Jul 12, 2020
@diemol diemol changed the base branch from master to trunk July 12, 2020 20:00
@barancev
Copy link
Member

Sorry for keeping this PR on hold for long time. We have implemented a new EventFiringDecorator that makes the proposed changes obsolete. See commits afdb348 and 47ee733

@barancev barancev closed this Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-java Java Bindings Z-awaiting review Archived: use GitHub review assignments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants