Get a node from the database based on its title.
$title: A node title, usually generated by $this->randomName().
$reset: (optional) Whether to reset the internal node_load() cache.
A node object matching $title.
function drupalGetNodeByTitle($title, $reset = FALSE) {
$nodes = node_load_multiple(array(), array(
'title' => $title,
), $reset);
// Load the first node returned from the database.
$returned_node = reset($nodes);
return $returned_node;
}