update,
This commit is contained in:
30
task1/task1-ticket1/_ref/Excel/Examples/usage_upload.bas
Normal file
30
task1/task1-ticket1/_ref/Excel/Examples/usage_upload.bas
Normal file
@@ -0,0 +1,30 @@
|
||||
Attribute VB_Name = "usage_upload"
|
||||
|
||||
Private Sub Upload_File_FF()
|
||||
Dim file As String
|
||||
file = ThisWorkbook.Path & "\mozilla_privacypolicy.pdf"
|
||||
|
||||
Dim driver As New ChromeDriver
|
||||
driver.Get "http://the-internet.herokuapp.com/upload"
|
||||
|
||||
'Upload the file
|
||||
driver.FindElementById("file-upload").SendKeys(file).Submit
|
||||
|
||||
'Stop the browser
|
||||
driver.Quit
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Upload_File_IE()
|
||||
Dim file As String
|
||||
file = ThisWorkbook.Path & "\mozilla_privacypolicy.pdf"
|
||||
|
||||
Dim driver As New IEDriver
|
||||
driver.Get "http://the-internet.herokuapp.com/upload"
|
||||
|
||||
'Upload the file
|
||||
driver.FindElementById("file-upload").SendKeys(file).Submit
|
||||
|
||||
'Stop the browser
|
||||
driver.Quit
|
||||
End Sub
|
Reference in New Issue
Block a user