Adding Selenium tests to Drupal7

Here are some problems I faced when adding selenium to a Drupal7 project I have been working on

1-Test cases are not listed.

Description: when installing the latest Selenium & SimpleTest modules, anything except selenium default tests are not listed in the Configuration/Testing

Fast Solution: Use latest Selenium  module with the default SimpleTest module installed with Drupal core.

2-Running the test case  randomly opens new default Drupal installation.

Description: Simple test is configured to clone the database structure and perform the test cases on this new database so you will not find any of your themes/modules enabled, In some cases the test user created will not be able to login.

Typical Solution: enable the themes/modules when setting up the test and run the patch file shipped with Selenium module without editing it.

Another Solution: run the test cases on the same database (a backup of it of course or whatever!), and this can be done with the following steps

a-Extending the DrupalSeleniumWebTestCase class

class DrupalSeleniumCustomTestCase extends DrupalSeleniumWebTestCase {
    public $onOriginal = TRUE;

[Drupal7] Adding new dependency to solr facets


here are the steps to add new dependency criteria for the facet on Drupal V7.

This post requires basic familiarity with Drupal development and understanding the integration with solr search and facetapi module. 

The dependency of facets is some conditions that are tested to display the facet or not. 

Facets are those controls displayed in the search for to refine the results scope.

There can be more than one dependency, the results of each dependency checks are anded to make the final decision whether to hide or show it. 

[Drupal7] Quick hack to display facet items as checkboxes/radio buttons

Hi, there are some facets that doesn't have the option to be displayed as checkboxes /radio buttons,or another option was required WITH being displayed as checkboxes.

Like displaying the Date range widget facet with date_range option.

With Facetapi module should be enabled add this jquery line to whatever js file loaded with the page.

 $('section.block-facetapi-id a').each(Drupal.facetapi.makeCheckbox);

Happy checkboxing :-)