CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2011
    Posts
    0

    Newbie question: How to run my .cs file?

    I tried to search for this topic but I couldn't find anything, maybe because it's too simple. I'm having a hard time understanding a really simple feature which is how can I run my .cs file?

    I am actually following the video instructions on WatiN here: http://watin.org/documentation/getting-started/

    Here is my 24 line code:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using NUnit.Framework;
    using WatiN.Core;

    namespace GettingStarted
    {
    [TestFixture]
    [RequiresSTA]
    public class Class1
    {
    [Test]
    public void Should_start_automating()
    {
    using (var browser = new IE("google.com"))
    {
    browser.TextField(Find.ByName("q")).TypeText("Hello Larry");
    browser.Button(Find.ByName("btnK")).Click();
    }
    }
    }
    }


    My problem is once I typed the code verbatim, I don't see a Run option like in the video about 2/3rds way through. I have tried going to Test--> Run --> Tests in Current Context but then it tells me my compilation suceeded but it cannot run because tests aren't loaded. All the searches I've done on loading tests seem to be a miss. I'm definitely not understanding something and would really appreciate a guiding hand on here.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Newbie question: How to run my .cs file?

    This really isn't a C# specific issue. Try contacting WatiN...

    http://watin.org/support/

  3. #3
    Join Date
    May 2011
    Location
    Washington State
    Posts
    220

    Re: Newbie question: How to run my .cs file?

    Are you using Visual Studio? Try F5 to start debugging...(start the application in debug mode).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured