Shane_Spencer
Programmer
I'm trying to write a VB Script to open the following URL:
I've got two problems. Firstly my script just opens a new Tab in an existing IE, with Address Bar etc. I'd like it to open a New Window without the AddressBar, StatusBar, ToolBar, MenuBar etc.
Secondly I'd like the two input boxes to be filled in (and better still would be to fill them in and click submit).
I've written the below code but the only bit that works is to open the URL (which will be a variable).
n.b. I'm doing this in QlikView which has a VB Script element.
I've got two problems. Firstly my script just opens a new Tab in an existing IE, with Address Bar etc. I'd like it to open a New Window without the AddressBar, StatusBar, ToolBar, MenuBar etc.
Secondly I'd like the two input boxes to be filled in (and better still would be to fill them in and click submit).
I've written the below code but the only bit that works is to open the URL (which will be a variable).
Code:
set vURL = "[URL unfurl="true"]https://test-www.tax.service.gov.uk/api-test-login/sign-in?continue=%2Foauth%2Fgrantscope%3Fauth_id%3D5ac74dbb260000260070a36b&origin=oauth-frontend"[/URL]
Set ieApp = CreateObject("Internetexplorer.Application")
ieApp.Visible = True
ieApp.Navigate vURL.GetContent.String
ieApp.AddressBar = 0
ieApp.StatusBar = 0
ieApp.Toolbar = 0
ieApp.MenuBar = 0
ieApp.Height = 500
ieApp.Width = 400
With ieApp.Document
.getElementByID("userId").value = "testing"
.getElementByID("password").value = "testpass"
' .getElementByID("form").submit
End With
n.b. I'm doing this in QlikView which has a VB Script element.