Jump to content
netbrfakes

Ajuda Clicar em um Webbrowser

Recommended Posts

netbrfakes

Ola, alguem poderia me ajuda me dizendo onde e o meu erro aqui?

If InStr(WebBrowser1.document.Body.InnerText, "Digite os dados da sua consulta.")  Then
			WebBrowser1.document.GetElementById("enviar").InvokeMember("click")

Dentro do html ta assim

<img id="Enviar" tabindex="10" src="./botao consulta" alt="enviar">

Se eu colocar assim

WebBrowser1.document.GetElementById("enviar").InvokeMember("click")

dentro de um butom , ai ele clica normal,

mas quando eu coloco assim

If InStr(WebBrowser1.document.Body.InnerText, "Digite os dados da sua consulta.")  Then
			WebBrowser1.document.GetElementById("enviar").InvokeMember("click")
end if

ele nao vai,

Teria como eu simular um click??

Share this post


Link to post
Share on other sites
I-NOZex

amigo, mas tu tas a misturar VB com JS!!! :D

tens de fazer algo assim:

Webbrowser1.document.window.Domwindow.execscript("funcaoJS(parametros)","Javascript")

Edited by I-NOZex

B2R » Beat2Revolution v3.0b | Regista e divulga-nos

beat2revolution.net

Share this post


Link to post
Share on other sites
netbrfakes

Webbrowser1.document.window.Domwindow.execscript("funcaoJS(parametros)","Javascript")

nao entendi :(

algo assim?

Webbrowser1.document.window.Domwindow.execscript("Enviar(click)","Javascript")

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • 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.