Link to home
Start Free TrialLog in
Avatar of Tiger858
Tiger858

asked on

WatiN Help C#

hi i'm trying to do the first WatIn  tutorial thing and i seem to be getting stuck and don't know why

here is my code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
using WatiN.Core;
namespace GettingStarted
{
    [TestFixture]
    [RequiresSTA]
   public class Class1
    {
        [Test]
        public void Should_start_google()
        {
            using (var browser=new IE("google.com")) 
            {
                browser.TextField(Find.ByName("q")).TypeText("hello");
                browser.Button(Find.ByName("btnG")).Click();
            }
        }
    }
}

Open in new window


and the errors are

Warning	1	A reference was created to embedded interop assembly 'c:\screencasts\GettingStarted\packages\WatiN.2.1.0\lib\net40\Interop.SHDocVw.dll' because of an indirect reference to that assembly created by assembly 'c:\screencasts\GettingStarted\packages\WatiN.2.1.0\lib\net40\WatiN.Core.dll'. Consider changing the 'Embed Interop Types' property on either assembly.	c:\screencasts\GettingStarted\GettingStarted\CSC	GettingStarted
Warning	2	A reference was created to embedded interop assembly 'c:\screencasts\GettingStarted\packages\WatiN.2.1.0\lib\net40\Microsoft.mshtml.dll' because of an indirect reference to that assembly created by assembly 'c:\screencasts\GettingStarted\packages\WatiN.2.1.0\lib\net40\WatiN.Core.dll'. Consider changing the 'Embed Interop Types' property on either assembly.	c:\screencasts\GettingStarted\GettingStarted\CSC	GettingStarted
Error	3	Program 'c:\screencasts\GettingStarted\GettingStarted\obj\Debug\GettingStarted.exe' does not contain a static 'Main' method suitable for an entry point	c:\screencasts\GettingStarted\GettingStarted\CSC	GettingStarted



how do i fix this to get this to run

thanks
Avatar of Marten Rune
Marten Rune
Flag of Sweden image

You could try to temporarily turn of UAC, or execute as administrator

Regards Marten
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial