Apologies if this is a ridiculous question. I've been slamming my head against the issue and cannot figure it out, even AFTER searching. If the answer is already in this thread, it's my lack of techinical knowhow that is creating the issue. In any event, I have a website and I want to input text in an edit. The following JS works in the console:
Code: Select all
const input = document.querySelector('input[name="cfDisplay"]');
input.addEventListener("keydown", function(event) {
if (event.keyCode === 13) {
event.preventDefault();
input.value = "your text here";
document.getElementById("myForm").submit();
}
});
I have tried a variety of approaches and for the life of me cannot get it to work using Rufaydium. I had THOUGHT that the following would work, but no.
Code: Select all
JS =
(
const input = document.querySelector('input[name="cfDisplay"]')
input.addEventListener("keydown", function(event) {
if (event.keyCode === 13) {
event.preventDefault()
input.value = "your text here"
document.getElementById("myForm").submit()
}
}
)
Session.CDP.Evaluate(js)
Can anyone spot what I'm doing wrong? Unfortunately cannot give access to the page in question...