ulixee / hero

The web browser built for scraping
MIT License
649 stars 32 forks source link

How change variable of any HTML Element? #187

Closed loss-and-quick closed 1 year ago

loss-and-quick commented 1 year ago

I want to change value of HTMLInputElement and DOC says Sets the current value of the control I used code as example below: input.value="test" But nothing changed

blakebyrnes commented 1 year ago

Thanks for your comment. The awaited dom is currently readonly. These docs are copied from msn and this is a documentation error we need to fix.

In the interim, you have a few options:

  1. You can click/type in the field using the interaction methods of hero and the awaited dom. This option will appear the most human
  2. If you need to set something in the dom to bypass interaction, you can use the execute-js plug-in listed in the docs
loss-and-quick commented 1 year ago

Thanks for your comment. The awaited dom is currently readonly. These docs are copied from msn and this is a documentation error we need to fix.

In the interim, you have a few options:

  1. You can click/type in the field using the interaction methods of hero and the awaited dom. This option will appear the most human
  2. If you need to set something in the dom to bypass interaction, you can use the execute-js plug-in listed in the docs

Thanks