2
  1. I am using VBA to automate Chrome to upload a file to a site, with the button of File type

  2. I have no idea about uploading script in chrome

My current VBA:

Sub UploadFile()
    Dim bot As WebDriver
    Set bot = New WebDriver
    bot.Start "chrome"
    bot.Get "https://tutorialehtml.com/en/html-tutorial-upload-form/"

         '#continue script here please"
End Sub

1 Answer 1

2

If there is any input field with attribute type = 'file' you can use the below code :

bot.FindElementByCss("input[type='file']").SendKeys "path of file"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.