Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8864903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:22:10+00:00 2026-06-14T16:22:10+00:00

I run a very simple watin console application like below using System; using System.Collections.Generic;

  • 0

I run a very simple watin console application like below

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

namespace ConsoleApplication2
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            IE ie = new IE();

            // point it to http://www.google.com

            ie.GoTo("http://www.google.com");

            // fill the search box

            ie.TextField(Find.ByName("q")).TypeText("WatiN");

            // performs click event

            ie.Button(Find.ByValue("Google Search")).Click();
        }
    }
}

Which is not working. A pop up said that there’s a missing .exe file. I can not understand because it’s just a console application. Why do I need the .exe file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:22:11+00:00Added an answer on June 14, 2026 at 4:22 pm

    If you are trying to use WatiN for web application testing through Internet Explorer, ensure to complete the right configurations first.

    NUnit doesn’t run tests in a thread using the STA apartment state; it uses multithreaded apartment (MTA), but this isn’t a big problem, you can attach config file to the NUnit test project and specify the apartment state mode that you want this way:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <configSections>
            <sectionGroup name="NUnit">
                <section name="TestRunner" type="System.Configuration.NameValueSectionHandler"/>
            </sectionGroup>
        </configSections>
        <NUnit>
            <TestRunner>
                <!-- Valid values are STA, MTA. Others ignored. -->
                <add key="ApartmentState" value="STA" />
            </TestRunner>
        </NUnit>
    </configuration>
    

    Article Reference:

    WatiN, Internet Explorer and Thread.Apartmentstate

    This article explains the why and how about setting the ApartmentState of a Thread to single treaded apartment (STA). This is required when running your test with Internet Explorer. It also shows you how to do this when using WatiN with NUnit, MBUnit, MSTest, TestDriven.Net, Fitnesse or SharpDevelop.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run very simple application using Drools and for a couple of
I'm attempting to run a very simple Blackberry/Java application which implements the BrowserField class.
I'm working on converting a very simple java desktop application to run in java
I have to run a very simple query like this in SQLite3. INSERT OR
Here is a very simple chunk of code using a jre 1.6 run time
I run a very simple, single-threaded java program. When I check the threads using
I'm currently using Modelsim 10.1 alongside ISE 13.4 and run a very simple test
I am using google caliper to run a very simple benchmark on a method.
I have a very simple method scheduled to run every 10 seconds like this:
I run a very simple php file on apache. Then I benchmark apache, using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.