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 8930833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:58:57+00:00 2026-06-15T08:58:57+00:00

I am creating a mass username availability checker for a forum but when the

  • 0

I am creating a mass username availability checker for a forum but when the timers are set to a high speed it sometimes says a username is available for the forum when it’s unavailable.

How can I ensure it’s checked the username properly before it skips to the next username in my listbox?

Example of my code:

// Timer1
timer1.Stop();
webBrowser1.Document.GetElementById("username").InnerText = list.SelectedItem.ToString();
webBrowser1.Document.GetElementById("register").InvokeMember("Click");   
list.SelectedIndex = list.SelectedIndex + 1;
timer2.Start();

// Timer2
timer2.Stop();
if (webBrowser1.Document.GetElementById("status").ToString().Contains("available"))
        {
            list2.Items.Add(list.SelectedItem.ToString());

            timer1.Start();
        }
        else
        {

            timer1.Start();
        }

Could I use WatiN or something to ensure it waits for it to check the availability of a username before it skips to the next tag? The page does not reload.

  • 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-15T08:58:58+00:00Added an answer on June 15, 2026 at 8:58 am

    You can poll the page content contains X or Y, then continue. I’m assuming here that the page will display “available” or “sorry, pick something else” message. If you don’t have a yes/no status displayed, this is going to be tougher.

    Something like the following: This is not tested code, just a rough idea of types of things I’ve done in scenarios like yours.

    int maxWaitTime = 5000
    int timeWaited = 0
    int interval
    
    while (!status.text.contains("available")) && !status.text.contains("pick something else") && timewaited < maxWaitTime)
    {
        Thread.Sleep(X)
        timeWaited += interval;   //Add X miliseconds.
    }
    
    if (timeWaited >= maxWaitTime)
    {
        throw new TimeoutException("Took too long to get a status")
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Creating the closure is easy but using it is confusing for me. Here is
Creating a Blackberry app. Just a beginner, I have searched but couldn't find a
I am creating a mass mailer application, where a web application sets up a
I'm creating a forum for a website, and plan on implementing a Report this
Creating an XPathDocument with referenced DTD sometimes throws a web exception. Why?
I have set up a HABTM relationship between two table creating a many to
Creating a class at runtime is done as follows: klass = Class.new superclass, &block
Creating an a app, where I store bunch of photos in the drawable folder,
Creating liquid layouts is an immense pain. Now, I totally understand that tables should
Creating a google map with store locations within 50 miles of user entered address.

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.