codeborne/selenide — pull request #141 by kumarunster (2014-10-22 20:31:11+00:00)
Title: Possibility to log important Selenide Actions/Subjects

Hi,

what would you say about this? I have added possibility to listen and process important selenide actions in form like event logs. Main motive is, that, sometimes we need to show to our "business" guys some reports about our UI-Tests, what they really do. Plain code is indeed very readable with Selenide, but, if for example the tests fails in Jenkins we need to show, some pretty reports, which steps are passed and wich not.

So, I think, instead of something like this:

```java
logger.info("element by name 'password' should not be readonly");
$(By.name("password")).shouldNotBe(readonly);
```
it would be great, to bring selenides great DSL-like syntax to be self-explanatory for some kinds of reports.

With this extension its possible to get following results (please run LogEventTest to see it on the console):

### Pretty report for Some Test Case

Element | Subject | Status
------------ | ------------- | -------------
Browser |open http://localhost:16968/page_with_selects_without_jquery.html | PASSED
By.name: username | should be attribute readonly | PASSED
By.name: password | should not be attribute readonly | PASSED
By.name: password | should be empty | PASSED
By.name: password | set value '123‘ | PASSED
By.selector: #login | click | PASSED

To get such report we can specify a Selenide Event Listener, register it and with help of a Junit Test Rule we can printout the report in each format we like, because all the events are in our hands. Also we can make it as a inherent part of each CI test job, wich shows the test in a human readable format.

Unfortunately I have polluted AbstractSelenideElement with some ugly try catch blocks, but I don't really know how to add such kind of feature without AOP with byte code manipulation into such a framework.

So what do you think about it? Maybe its correlated with your issue #37?

Best regards!