New Blog

I wont be posting any more webdriver tips on this blog. But fear not, you wont be missing out on your needed updates from all things webdriver as these posts will be making their way ot

Be sure to check it out @

Leave a Comment

Filed under Technology

Importing Config Files with C# NUnit tests

How to use an NUnit Configuaration file to pass values to a test at runtime?

  1. Create your XML Configuration file using the format below. Add your Key,Value pairs in appSettings section
  2. Use the correct file name for your config file
  3. Add a reference to System.Configuration and add a corresponding using statement
  4. Use the ConfigurationManager object to access your parameters in your test code

(1) Basic Config File is in this format:

<?xml version="1.0" encoding="utf-8" ?>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
<add key="TestURL" value=""/>
<add key="Browser" value="Firefox"/>

(2) Config File Naming Scheme
Your config file has to be in the same folder as the test dll, and it must be the same name with .config suffixed. For example if you test dll is called MySeleniumTest.dll your config file must be called MySeleniumTest.dll.config, and it must be located in the same folder.

(3) Add a Reference to System.Configuration
In your Visual Studio project, add a reference to System.Configuration, as well as a corresponding using statement:

using System.Configuration;

(4) Use ConfigurationManager object
Here is an example of how you can access your config parameters in you NUnit tests:

testURL = ConfigurationManager.AppSettings["TestURL"];
browser = ConfigurationManager.AppSettings["Browser"];

1 Comment

Filed under General

C# – Generate a six digit random number

Here is a useful snippet to generate a six digit random number in C#

    // Generate a 6 digit random number
    Random r = new Random()
    randomNumber = r.Next(100000,999999);
    Console.WriteLine("Your random number is: {0}", randomNumber);

1 Comment

Filed under snippet

Shot Through the Heart

Leave a Comment

Filed under Entertainment

Keep your eyes on the road

Keep your eyes on the road.

Leave a Comment

Filed under General

MySQLi – Querying

$sql = "SELECT name, phone FROM contacts where contactID=12";
$results = $db->query($sql);
$rows = $result->fetch_assoc();

// Display results stored in $rows[]
echo "<p>$rows['name']</p>";
echo "<p>$rows['phone']</p>";

or for returning more than one item:

$sql= "SELECT * FROM contacts ORDER BY name";
$result = $db->query($sql);
while ($rows = $result->fetch_assoc()) 
    echo "<p>$row['name'] $row['phone']</p>";

Leave a Comment

Filed under PHP

MySQLi – Connect to a database

$db = new mysqli('localhost', 'username', 'password', 'database');

if($db->connect_errno > 0){
    die('Error connecting to database [' . $db->connect_error . ']');

Leave a Comment

Filed under PHP

John Duggan’s Cheltenham Tips (2014)


1.30 – €35 each way on Tiger Roll at 10/1
2.05 – €35 each way on Cheltenian at 8/1
3.20 – €50 each way on Last Instalment at 15/2 and €25 each way on Lord Windermere at 28/1
4.00 – €70 each way on Harbour Court at 9/2
4.40 – €35 each way on Leo Luna at 14/1

Continue reading

Leave a Comment

Filed under Sport

Irish Ukranians, Not Russians



RTE program Primetime suffered an embarrassing technical failure last night.

Leave a Comment

Filed under Entertainment

San Francisco Bay from Sausalito

A black and white of San Francisco taken from Sausalito.

Leave a Comment

Filed under General