Remove a line of JS in a live page before submit

Hi there.

Not sure if this is the right place, but I have a small RPA robot that goes into a site fills up a form, and submits it. Recently, the page owner added a piece of Javascript that is causing problems (it is a single line). I know from the development tools in the browser I can comment it out and run everything properly.

My question is: Is there a way within Robotframework for me to comment that line out in the browser before filling the form?

thanks in advance for any help.
Andre

Interesting approach. Have you looked into Playwright? Or then just plain old “execute javascript” that would do the trick for you?

not familiar with Playwright. I will take a look.

But execute javascript would work… Maybe inject the function without the line that is causing problems and remove the original version through a execute Javascript line.