Closed runningcheese closed 2 years ago
I have no idea what that pages is supposed to do. I can't read it. You can try dispatching the change event.
document.querySelector('input').value = searchTerms;
document.querySelector('input').dispatchEvent(new Event('change'));
document.querySelector('.ant-input-search-button').click();
I modified it slightly, maybe the code is a bit bloated :joy:
(async() => {
let input = document.querySelector('.ant-input.ant-input-lg');
input.focus();
input.value = searchTerms;
input.dispatchEvent(new Event("input"));
input.dispatchEvent(new Event("change"));
await new Promise(r => setTimeout(r, 200));
document.querySelector('.ant-input-search-button').click();
})();
不过我随便找了一个视频试了下,没有去掉 logo
Is it working?
yeah, it's working! thanks @ssborbis @7peanuts
@ssborbis Sorry to bother you again.What about this site? https://html2pdf.app i have try the code below, but not working correctly.
(async() => { let input = document.querySelector('.form-control'); input.focus(); input.value = searchTerms; input.dispatchEvent(new Event("input")); input.dispatchEvent(new Event("change")); await new Promise(r => setTimeout(r, 200)); document.querySelector('.btn.btn-primary.m-t-24').click(); })();
I'm getting good results with just this. I need to click the prompt to save or download, but it's working fine in FF
(async() => {
let input = document.querySelector('.form-control');
input.focus();
input.value = "http://example.com";
document.querySelector('.btn.btn-primary.m-t-24').click();
})();
What browser are you on?
What browser are you on?
Firefox, firefox is my favorite browser.
@ssborbis
(async() => { let input = document.querySelector('.form-control'); input.focus(); input.value = "http://example.com"; document.querySelector('.btn.btn-primary.m-t-24').click(); })();
i have just try this code in chrome, but it seems not working either.
i DID a lot of research in "Issues".
but it just not happening, could you please help me up, thanks in advance.