When click on sharepoint link, it alerts below authentication for username & password
Is there any way to handle this authentication ?
When click on sharepoint link, it alerts below authentication for username & password
Is there any way to handle this authentication ?
With the credentials in the URL (Basic Authentication only):
Dim driver As New IEDriver
driver.Get "http://admin:admin@the-internet.herokuapp.com/basic_auth"
With the SetCredential method (not implemented with all the drivers):
Dim driver As New IEDriver
driver.Get "http://the-internet.herokuapp.com/basic_auth"
Dim dlg As Alert: Set dlg = driver.SwitchToAlert(Raise:=False)
If Not dlg Is Nothing Then
dlg.SetCredentials "admin", "admin"
dlg.Accept
End If
With WScript (only works locally):
Dim driver As New IEDriver
driver.Get "http://the-internet.herokuapp.com/basic_auth"
Dim dlg As Alert: Set dlg = driver.SwitchToAlert(Raise:=False)
If Not dlg Is Nothing Then
Set wsh = CreateObject("WScript.Shell")
wsh.SendKeys "admin"
wsh.SendKeys "{TAB}"
wsh.SendKeys "admin"
dlg.Accept
End If
With AutoIt (only works locally):
Dim driver As New IEDriver
driver.Get "http://the-internet.herokuapp.com/basic_auth"
Dim dlg As Alert: Set dlg = driver.SwitchToAlert(Raise:=False)
If Not dlg Is Nothing Then
Set aut = CreateObject("AutoItX3.Control")
aut.Send "admin"
aut.Send "{TAB}"
aut.Send "admin"
dlg.Accept
End If
To get the latest version in date working with the above examples: https://github.com/florentbr/SeleniumBasic/releases/latest