Results 1 to 2 of 2

Thread: axWebBrowser Filling out Poll

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    58

    axWebBrowser Filling out Poll

    I am trying to create a win app that will test polls that I have created on sites, after submitting a vote, it takes you to a page with results. I am using the axWebBrowser to do this. If I place my code in documentComplete I can get it to cast 1 vote. But I want to vote hundreds of times. If I try to create a loop I am unable to vote even once. 1)Is there a way to determine when the page fully loads, then i could place it in the loop 2) any ideas why i am not even able to vote once. Here is the code that i am using

    for (int count = 0; count < max; count++)
    {
    object loc = "sitewillpoll";
    object null_obj_str = "";
    System.Object null_obj = 0;
    this.axWebBrowser1.Navigate2(ref loc, ref null_obj, ref null_obj, ref null_obj_str, ref null_obj_str);

    HTMLDocument myDoc = new HTMLDocumentClass();
    myDoc = (HTMLDocument)axWebBrowser1.Document;


    HTMLInputElement radioButton = (HTMLInputElement)myDoc.getElementById(strRadio);
    radioButton.@checked = true;


    HTMLInputElement btnSubmit = (HTMLInputElement)myDoc.all.item("vote", 0);
    btnSubmit.click();
    }

  2. #2

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    58

    Re: axWebBrowser Filling out Poll

    It appears that the button click for the submit vote never gets fired. Is there another way to click a button on the form other then the method that I am using?

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