You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.
You can run you own code in evaluate function like this:
const{Chromeless}=require('chromeless');asyncfunctionrun(){// use local chromeconstchromeless=newChromeless({remote: false});constlinks=awaitchromeless.goto('https://www.google.com').type('chromeless','input[name="q"]').press(13).wait('#resultStats').evaluate(()=>{functionclearInputDomValue(queryStr){constdom=document.querySelector(queryStr);if(dom){dom.value='';return'success';}else{console.error('failed, query is',queryStr);return'failure';}}clearResult('#sbhost');}).scrollTo(0,1000);// do not close chrome after execution, so that if you do not start// chrome in 'headless' mode, you can see the result in chrome// await chromeless.end();}run().catch(console.error.bind(console));
How does one clear a text input? Pressing backspace a lot feels dirty.
On the flipside, injecting some javascript and clearing that way is causing some weird issues.
Could we have a setValue or clear API method for inputs?
The text was updated successfully, but these errors were encountered: