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

  • Home
  • SEARCH
  • 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 6053101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:00:07+00:00 2026-05-23T08:00:07+00:00

I am writing some regression tests in WatiN and needed to make a couple

  • 0

I am writing some regression tests in WatiN and needed to make a couple POST web requests. The requests are working fine but I get an annoying dialog box asking me if I want to save the file or find a program online to open it. The line of code that is causing this is:

browser.Navigate2(ref uri, ref nflags, ref ntargetFrame, 
                  ref dataBytes, ref headers);

Is anyone familiar with the Navigate2() method? Any idea on how to get rid of this download box?

  • 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-05-23T08:00:08+00:00Added an answer on May 23, 2026 at 8:00 am

    Here is my answer:

    The Navigate2() method looks like this:

    HRESULT Navigate2(
        VARIANT *URL,
        VARIANT *Flags,
        VARIANT *TargetFrameName,
        VARIANT *PostData,
        VARIANT *Headers
    );
    

    the flags can be defined as enum BrowserNavConstants like this:

    typedef enum BrowserNavConstants {
        navOpenInNewWindow = 0x1,
        navNoHistory = 0x2,
        navNoReadFromCache = 0x4,
        navNoWriteToCache = 0x8,
        navAllowAutosearch = 0x10,
        navBrowserBar = 0x20,
        navHyperlink = 0x40,
        navEnforceRestricted = 0x80,
        navNewWindowsManaged = 0x0100,
        navUntrustedForDownload = 0x0200,
        navTrustedForActiveX = 0x0400,
        navOpenInNewTab = 0x0800,
        navOpenInBackgroundTab = 0x1000,
        navKeepWordWheelText = 0x2000,
        navVirtualTab = 0x4000,
        navBlockRedirectsXDomain = 0x8000,
        navOpenNewForegroundTab = 0x10000
    } BrowserNavConstants;
    

    I used navUnstrustedForDownload and it did away with the download box. Hope this helps someone somewhere

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

Sidebar

Related Questions

In writing some tests for a project I'm working on, I found that the
I was working on writing some servlets and they all worked fine Tomcat had
I'm writing some tests for a rails application to make sure my index action
I'm using Watir 1.6.7. I'm working on developing some regression tests for a PeopleSoft
Im writing some helper functions for a project im working on. I've always wanted
While writing some views to respond to ajax requests i find it somewhat strange
I'm writing some html code to make an html email. I've done some research
I'm writing some code that calls a web service, reads back the response and
while writing some acceptance tests for my webapp (playframework based),I got confused by the
I'm writing some xUnit tests for some helper classes that relies on some configuration

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.