I'm trying to set the disabled attribute of an input element to false with chromedp. I can modify it's value with the console chrome dev tool but didn't achieved it in my code.
I will explain the complete behaviour of this input and why I need it.
I have a first select input that I modify with this command
err = chromedp.Run(ctx, chromedp.SetValue("select[name=lstDoc]", rcp, chromedp.ByQuery)) if err != nil { log.Fatal(err) }
Normally you must click it and it automatically change the disabled attributes of the one I'm targeting when you modify it's value. It's working.
Now we arrive at element I can't modify, I can put date in it, so I now my selector is correct put I can't change the disabled attribute, here what I'm actually trying:
dateDebut := "#txtDebutMAJ" err = chromedp.Run(ctx, chromedp.SetAttributeValue(dateDebut, "disabled", "false", chromedp.ByQuery)) if err != nil { log.Fatal(err) }
I have run chromedp with headless
at false so i can clearly see that the element is still disabled because it's always grayed out.
What I have tried with the console and it worked:
$("#txtDebutMAJ").disabled = false