Click here to Skip to main content
15,608,652 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
selecting radio button on site and selecting object from form on site


my Code =

var links = geckoWebBrowser1.Document.GetElementsByTagName("input");
foreach (Gecko.DOM.GeckoInputElement link in links)
{
    if (link.GetAttribute("Name") == "title")
    {
        link.Value = "Best Bundle Layered 90 Files, Game SVG - UnderTale SVG - Under Svg - Tale Svg for Cricut - Digital File Active";
    }
   else if (link.GetAttribute("Name") == "quantity-input")
    {
        link.Value = "999";
    }
    var button = new GeckoButtonElement(geckoWebBrowser1.Document.GetElementById("listing-edit-image-upload").DomObject);
    button.Click();

    //var a = geckoWebBrowser1.Document.GetElementsByName("is_digital")[2].InvokeMember("click");// InvokeMember error
   // object p = geckoWebBrowser1.Document.GetElementsByTagName("input").GetElementsByName("is_digital")[2].InvokeMember("click");//GetElementsByName error

}


What I have tried:

geckoWebBrowser1.Document.GetElementsByName("is_digital")[2].InvokeMember("click");// InvokeMember error
               // object p = geckoWebBrowser1.Document.GetElementsByTagName("input").GetElementsByName("is_digital")[2].InvokeMember("click");//GetElementsByName error
Posted
Updated 27-Jan-23 20:38pm

1 solution

<div class="col-md-4 pr-md-0 mb-xs-1 mb-md-0"><div class="has-validation"><div class="select-wrap"><label class="screen-reader-only" for="who_made">Who made it?</label><div class="has-validation tooltip-red " id="who_made"><select aria-describedby="who_made-help" id="who_made-input" class="select select-custom" required=""><option value="">Who made it?</option><optgroup label="Select a maker"><option value="i_did">I did</option><option value="collective">A member of my shop</option><option value="someone_else">Another company or person</option></optgroup></select></div></div></div></div>


I've done the radio buttons but  I can't select from the option values ​​in the form. 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900