Question: I am writing unit testcases for a UI Framework using **Mocha**, **Chai** and **Karma**. I have analysed before whether to use selenium webdriver to do testing, but since most of the test cases involve working with DOMElement I have found it difficult to be working with selenium though javascript version( **WebDriverJS** ) is available.

Even when I checked other UI Frameworks like **jquery ui**, **kendo**, **semantic**, **foundation** etc.. they have used javascript frameworks like **jasmine**, **qunit** etc.. for testing rather than selenium. 

What could be the reason that UI Framework developers do not prefer Selenium?

Answer: 
Selenium is a UI automation library whereas libraries like Jasmine is a general javascript test framework which can be utilized for the unit as well as UI testing automation for the assertions.

If you are purely unit testing, then probably you don't need selenium.
The reason is quick feedback. unit tests run much faster and selenium/protractor being e2e solutions runs slower. There is a clear separation between unit test and end to end testing. 

Please let us know in specific what you need to understand.