diff --git modules/simpletest/drupal_web_test_case.php modules/simpletest/drupal_web_test_case.php
index c2571e9..5cd65d7 100644
--- modules/simpletest/drupal_web_test_case.php
+++ modules/simpletest/drupal_web_test_case.php
@@ -1700,7 +1700,6 @@ class DrupalWebTestCase extends DrupalTestCase {
         switch ($type) {
           case 'text':
           case 'textarea':
-          case 'hidden':
           case 'password':
             $post[$name] = $edit[$name];
             unset($edit[$name]);
@@ -1764,6 +1763,19 @@ class DrupalWebTestCase extends DrupalTestCase {
             $upload[$name] = $edit[$name];
             unset($edit[$name]);
             break;
+
+          case 'hidden':
+            // On some pages (like admin/structure/triggers/user) there are
+            // several identical forms, and Simpletest cannot figure out
+            // which one it is to act on. However, the $edit can include
+            // a hidden field to help identify the correct form.
+            // Since the hidden field does not actually have to be submitted,
+            // once we find it, we can unset the $edit member and not actually
+            // submit it.
+            if ($edit[$name] == $value) {
+              unset($edit[$name]);
+            }
+            break;
         }
       }
       if (!isset($post[$name]) && !$done) {
@@ -2711,6 +2723,31 @@ class DrupalWebTestCase extends DrupalTestCase {
   }
 
   /**
+   * Look for a regex in the body of the email.
+   * @param string $name
+   *   Name of the portion of the body to search. Most common: 'body'
+   * @param string $regex
+   *   Text to search for.
+   * @param string $message
+   *   Message for simpletest.
+   */
+  protected function assertMailPattern($name, $regex, $message) {
+    $mails = $this->drupalGetMails();
+    $mail = end($mails);
+    $regex_found = preg_match("/$regex/", $mail[$name]);
+    $this->assertTrue($regex_found, $message);
+  }
+
+  /**
+   * Output to verbose the most recent email sent.
+   */
+  protected function verboseEmail() {
+    $mails = $this->drupalGetMails();
+    $mail = end($mails);
+    $this->verbose(t("Email  was:") . "<pre>" . print_r($mail, TRUE) . "</pre>");
+  }
+
+  /**
    * Log verbose message in a text file.
    *
    * The a link to the vebose message will be placed in the test results via
diff --git modules/trigger/tests/trigger_test.module modules/trigger/tests/trigger_test.module
index 16bd703..ce67049 100644
--- modules/trigger/tests/trigger_test.module
+++ modules/trigger/tests/trigger_test.module
@@ -63,12 +63,12 @@ function trigger_test_trigger_info() {
   return array(
     'node' => array(
       'node_triggertest' => array(
-        'runs when' => t('A test trigger is fired'),
+        'label' => t('When a test trigger is fired'),
       ),
     ),
     'trigger_test' => array(
       'trigger_test_triggertest' => array(
-        'runs when' => t('Another test trigger is fired'),
+        'label' => t('When another test trigger is fired'),
       ),
     ),
   );
diff --git modules/trigger/trigger.test modules/trigger/trigger.test
index 0aa219f..7e9680b 100644
--- modules/trigger/trigger.test
+++ modules/trigger/trigger.test
@@ -196,11 +196,11 @@ class TriggerOtherTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('trigger', 'trigger_test');
+    parent::setUp('trigger', 'trigger_test', 'contact');
   }
 
   /**
-   * Test triggering on user create.
+   * Test triggering on user create and user login.
    */
   function testActionsUser() {
     // Assign an action to the create user trigger.
@@ -231,9 +231,82 @@ class TriggerOtherTestCase extends DrupalWebTestCase {
     $this->assertTrue(variable_get($action_id, FALSE), t('Check that creating a user triggered the test action.'));
 
     // Reset the action variable.
-    variable_set( $action_id, FALSE );
+    variable_set($action_id, FALSE);
+
+    // Assign a configurable action 'Redirect to URL' to the user_login trigger.
+    $this->drupalLogin($test_user);
+    $hook = 'user_login';
+    $url = 'contact';
+    $action_label = $this->randomName(16);
+    $edit = array(
+      'actions_label' => $action_label,
+      'url' => $url,
+    );
+
+    // Configure an advanced action that we can assign.
+    $aid = $this->configureAdvancedAction('system_goto_action', $edit);
+    $edit = array(
+      'aid' => md5($aid),
+      // The hook is a hidden field which we use to let simpletest find the
+      // correct form on the trigger page.
+      'hook' => $hook,
+    );
+    $this->drupalPost('admin/structure/trigger/user', $edit, t('Assign'));
+
+    // Verify that the action has been assigned to the correct hook.
+    $actions = trigger_get_assigned_actions($hook);
+    $this->assertEqual(1, count($actions), t('One Action assigned to the hook'));
+    $this->assertEqual($actions[$aid]['label'], $action_label, t('Correct action label found.'));
+
+    // Now see what happens when the user logs in. It should go to the
+    // contact form.
+    $contact_user = $this->drupalCreateUser(array('access site-wide contact form'));;
+    $this->drupalLogin($contact_user);
+    $landing_url = $GLOBALS['base_url'] . '/contact';
+    $this->assertTrue($this->getUrl() == $landing_url, t("Correctly redirected to contact page"));
+  }
+
+  /**
+   * Test triggering an email with a node creation.
+   */
+  function testTriggeringAdvancedActions() {
+    $test_user = $this->drupalCreateUser(array('administer actions', 'access content', 'create article content'));
+    $this->drupalLogin($test_user);
+    // Create an article that we will view later;
+    $this->drupalPost('node/add/article', array('title' => t("some title"), 'body[und][0][value]' => t('some body')), t('Save'));
+    $this->assertText(t("Article some title has been created"));
+    $saved_node = $this->getUrl();
+
+    // Configure an email action that we will trigger.
+    $action_label = $this->randomName(16);
+    $send_mail_action_edit = array(
+      'actions_label' => $action_label,
+      'recipient' => $this->randomName(8) . "@example.com",
+      'subject' => $this->randomName(8),
+      'message' => t('Node viewed:[node:title]'),
+    );
+    $aid = $this->configureAdvancedAction('system_send_email_action', $send_mail_action_edit);
+    $hook = 'node_view';
+    $edit = array(
+      'aid' => md5($aid),
+      'hook' => $hook,
+    );
+    $this->drupalPost('admin/structure/trigger/node', $edit, t('Assign'));
+
+    // Verify that the action has been assigned to the correct hook.
+    $actions = trigger_get_assigned_actions($hook);
+    $this->assertEqual(1, count($actions), t('One Action assigned to the hook'));
+    $this->assertEqual($actions[$aid]['label'], $action_label, t('Correct action label found.'));
+
+    // Visit the page we created earlier and trigger sending an email.
+    $this->drupalGet($saved_node);
+    $this->verboseEmail();
+    $this->assertMail('to', $send_mail_action_edit['recipient'], t("Correct recipient for email"));
+    $this->assertMailPattern('body', t('Node viewed:some title'), t("Email body is correct and has expanded token"));
   }
 
+
+
   /**
    * Test triggering on comment save.
    */
@@ -247,7 +320,7 @@ class TriggerOtherTestCase extends DrupalWebTestCase {
     $this->drupalPost('admin/structure/trigger/comment', $edit, t('Assign'));
 
     // Set action variable to FALSE.
-    variable_set( $action_id, FALSE );
+    variable_set($action_id, FALSE);
 
     // Create a node and add a comment to it.
     $web_user = $this->drupalCreateUser(array('create article content', 'access content', 'post comments without approval', 'post comments'));
@@ -276,7 +349,7 @@ class TriggerOtherTestCase extends DrupalWebTestCase {
     $this->drupalPost('admin/structure/trigger/taxonomy', $edit, t('Assign'));
 
     // Set action variable to FALSE.
-    variable_set( $action_id, FALSE );
+    variable_set($action_id, FALSE);
 
     // Create a taxonomy vocabulary and add a term to it.
 
@@ -298,4 +371,36 @@ class TriggerOtherTestCase extends DrupalWebTestCase {
     // Verify that the action variable has been set.
     $this->assertTrue(variable_get($action_id, FALSE), t('Check that creating a taxonomy term triggered the action.'));
   }
+
+  /**
+   * Configure an advanced action.
+   * @param string $hook
+   *   The name of the hook. For example: 'user_presave', 'user_login'
+   * @param array $action_configure_edit
+   *   The $edit array for the form to be used to configure.
+   *   Example members would be 'actions_label' (always), 'message', etc.
+   * @return integer
+   *   the aid (action id) of the configured action, or -1 if none.
+   */
+  protected function configureAdvancedAction($hook, $action_configure_edit) {
+    // Create an advanced action.
+    $hash = md5($hook);
+    $this->drupalPost("admin/config/system/actions/configure/$hash", $action_configure_edit, t('Save'));
+    $this->assertText(t('The action has been successfully saved.'));
+
+    // Now we have to find out the action ID of what we created.
+    $cell_to_find = "//div/table/tbody/tr/td[2][. = '{$action_configure_edit['actions_label']}']/../td[3]/a[@href]";
+    $this->assertFieldByXPath($cell_to_find, t('configure'), t('Found the configure link'));
+    $atag = $this->xpath($cell_to_find);
+    $this->assertTrue(is_object($atag[0]), t("Found the cell with 'configure' in it"));
+    if (is_object($atag[0])) {
+      $href = (string)$atag[0]->attributes()->href;
+      $aid = preg_replace('/^.*\//', '', (string)$href);
+      $this->verbose(t('The action ID for configured action hook=@hook is aid=@aid.', array('@hook' => $hook, '@aid' => $aid)));
+      return $aid;
+    }
+    return -1;
+  }
+
+
 }
