Jump to content

Como pressionar automáticamente no botão de uma página.

Recommended Posts


Olá boa noite.

Estou a tentar com que a função em baixo, efectue um "Click" no botão de uma página de internet, mas não estou a conseguir.

Alguém me pode ajudar?

Código HTML = <input tabIndex="3" class="input_submit" type="submit" value="Entrar"/>


Public Sub Motor_Login()		  
		Dim objIE As SHDocVw.InternetExplorer
		Dim htmlDoc As mshtml.HTMLDocument
		Dim DocElements As mshtml.IHTMLElementCollection = Nothing
		Dim urlx As String
		urlx = "http://www.portugal-a-programar.pt/index.php?app=core&module=global&section=login"
		objIE = New SHDocVw.InternetExplorer
		With objIE
			htmlDoc = .Document
			DocElements = htmlDoc.getElementsByTagName("className")
			While .Busy = True
			End While
			For Each i As mshtml.IHTMLElement In DocElements
				If i.value = "input_submit" Then
				End If
			Next i
		End With
end sub

Grato desde já pela vossa atenção.



Edited by programadorvb6

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.