Closed snja closed 3 years ago
uploading files is not a common feature, I prefer to usingDOM.setFileInputFiles
like this (shopify uploader)
root_id = (await
tab.send('DOM.getDocument'))['result']['root']['nodeId']
nodeId = (await
tab.send('DOM.querySelector',
nodeId=root_id,
selector='input[type="file"]'))['result']['nodeId']
await tab.send('DOM.setFileInputFiles',
files=[str(path.absolute())],
nodeId=nodeId)
If you really need the send_keys
method, try the tab.keyboard_send
method
if on selenium use send_keys, Has anyone ever used this Ichrome successfully?