Web Browser Control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bhaveshkotwani
    New Member
    • Feb 2010
    • 2

    Web Browser Control

    Hi

    I am using the following code to programmaticall y fill my form

    webbrowser.docu ment.getelement byid("txtbox"). setattribute("v alue", "hi")

    I am stuck at a point where i need to set the values for select box, check box and radio buttons.

    Any help is appreciated.

    thanks in advance.
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    have ya tried the ".checked" property? That's what I would use on a windows form

    Code:
    myCheckbox.Checked = true;
    I've never done it for a webform but I would guess something that looks like

    Code:
    webbrowser.document.getelementbyid("mycheckbox").setattribute("checked", true)
    // or
    webbrowser.document.getelementbyid("mycheckbox").setattribute("checked", "true")

    Comment

    • bhaveshkotwani
      New Member
      • Feb 2010
      • 2

      #3
      The SetAttribute accepts two parameters and both should be string. The above code doesnt works.

      Thanks for you help. I am still looking for a solution.

      Comment

      Working...