Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Log event listener improvements #927
Currently SelenideLogger only logs stuff after each event happened, so in order to apply some logic before some action happens we have to resort to implementing custom WebDriverEventListener, which does not support all the methods that we might be interested in.
Example: I want to log click() methods before click happened. Currently I can not do it, as onEvent logs after event happened.
Added beforeEvent() method to LogEventListener and renamed onEvent to afterEvent to make it clear and consistent. beforeEvent() will be called in SelenideLogger.beginStep(...) method, which is used in SelenideElementProxy.invoke(...) method before dispatchAndRetry(), which will ensure the event is logged before action.
rosolko left a comment •