Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UnauthorizedAccessException on my Laptop

Status
Not open for further replies.

BenThereSeveralTimes

Technical User
Apr 6, 2007
5
US
Hi,

My Desktop is working fine. My Laptop, however, has started generating an UnauthorizedAccessException when I run the following code:

using System;
using System.Collections.Generic;
using System.Text;
using WatiN.Core;

namespace WatiNGettingStarted
{
class Program
{
[STAThread]
static void Main(string[] args)
{
//try
//{
IE ie = new IE("C:/Documents and Settings/All Users/Documents/My PO/Blue.htm");

ie.Link(Find.ByText("Log On")).Click();

Console.WriteLine("After Log On Click");
//}
//catch (Exception ex)
//{
//Console.WriteLine("Fatal Error: " + ex.Message);

//Console.ReadLine();
//}

}
}
}

The code fails on the line:

ie.Link(Find.ByText("Log On")).Click();

Blue.htm is located on the shared drive.

I took a look at thread732-1094111, but didn't see an obvious solution.

I would appreciate any help

Thanks,

Ben



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top