here is some code you can play with... hopefully it is 100% compatible with .net i googled a couple functions and it looks like it should work
ok so to check if website is opened try this
Code:Dim objShell As Object, objIE As Object, objShellWindows As Object Dim iCount As Integer Set objShell = CreateObject("Shell.Application") Set objShellWindows = objShell.Windows On Error Resume Next For i = 0 To objShellWindows.Count - 1 If InStr(1, objIE.locationurl, "https://idp.feide.no") Then MsgBox "Found idp.feide.no Website!" End If Next
and for manipulation of document... of Internet Explorer (sorry no luck with chrome it uses WebKit and completely different i guess)
so add one of those to a button click or form load try and play around with that i hope it will work for you it does for me... let me know if you need more helpCode:Dim IE As Object Set IE = CreateObject("InternetExplorer.Application") With IE .Silent = True .Visible = True .Navigate "https://idp.feide.no/simplesaml/module.php/feide/login.php?org=alstahaug.kommune.no&asLen=253&AuthState=_0436c342a257156857910430fffbb853228cef6218%3Ahttps%3A%2F%2Fidp.feide.no%2Fsimplesaml%2Fsaml2%2Fidp%2FSSOService.php%3Fspentityid%3Durn%253Amace%253Afeide.no%253Aservices%253Acom.itslearning%26cookieTime%3D1348966536%26RelayState%3Dhttps%253A%252F%252Fwww.itslearning.com%252Felogin%252Fdefault.aspx&submit=Continue+%C2%BB" End With Do While Not IE.locationurl = "https://idp.feide.no/simplesaml/module.php/feide/login.php?org=alstahaug.kommune.no&asLen=253&AuthState=_0436c342a257156857910430fffbb853228cef6218%3Ahttps%3A%2F%2Fidp.feide.no%2Fsimplesaml%2Fsaml2%2Fidp%2FSSOService.php%3Fspentityid%3Durn%253Amace%253Afeide.no%253Aservices%253Acom.itslearning%26cookieTime%3D1348966536%26RelayState%3Dhttps%253A%252F%252Fwww.itslearning.com%252Felogin%252Fdefault.aspx&submit=Continue+%C2%BB" DoEvents Loop Do While IE.readystate <> 4 DoEvents Loop 'Start Using Document IE.document.Forms.f.username.Value = "Example For You" IE.document.Forms.f.password.Value = "MyPasswordHere" 'This (below) is the Login Button (to click on the button)... remove the ' to allow click on the button 'IE.document.Forms.f.childNodes.Item(1).childNodes.Item(5).childNodes.Item(10).Click




Reply With Quote
