Hi Guys
My english is very poor, so apologise for that.
I'm trying to write a script to fill a text box and, after thar, to click on a button
I can fill the text Box with this code:
#####################################################################################
Pwb := ComObjCreate( "InternetExplorer.Application" ) ;Creates the ComObj
Pwb.Navigate("http://sipe.jtcredtributarios.ritta.loc ... inicio.htm")
Pwb.Visible := True ; Shows the IE app
While ( Pwb.Busy || Pwb.ReadyState != 4 ) ; Waits for the webpage to finish loading
Sleep 10
WinWait, Sistema de Penhoras Electrónicas
WinMaximize,
Sleep 100
valor := ""
Objecto :=Pwb.document.getElementById("numeroPedidoPenhora")
Objecto.value := pedido
(Here I need to click on "Pesquisar")
####################################################################################
I tryed to reach the "Pesquisa" button, but I did'nt achieve to find it.
I Adde three files to show what I need.
I'm working on an intranet.
I don't know if I need to explain more my problem.
Thanks, in advance
Click on a button
Re: Click on a button
I've tried opening that webpage but unsuccessfully..
I notice few mistakes in your script;
There must be space before Sleep, so it determines which codes will execute while "while-loop" is active
It cannot be left blank, you must specify the windows title
You need to get the button element ID or name, this is an example for ID:
I notice few mistakes in your script;
Code: Select all
While pwb.busy or pwb.ReadyState !=4 ; Waits for the webpage to finish loading
Sleep 10
Code: Select all
WinMaximize,
You need to get the button element ID or name, this is an example for ID:
Code: Select all
pwb.document.getElementById("elementidhere").click()
Re: Click on a button
Thank you for your answer. I Thougth I had add three files but I can't see them. Tomorrow I'l try again to add them because they are 1-the html code, 2-a prtScr of the page I want to fill and 3-a PrtScr of the windowSpy with the control info. I can't find the Id of the control.
Tomorrow I'l send you mopre info, if I can, because the page I use is in a intranet of my Organization.
Thank you, again.
Tomorrow I'l send you mopre info, if I can, because the page I use is in a intranet of my Organization.
Thank you, again.
Re: Click on a button
Okay sure man, no problem.
Meanwhile, check out this easy tool to get webpage info.
https://autohotkey.com/board/topic/8425 ... bbrowser2/
Meanwhile, check out this easy tool to get webpage info.
https://autohotkey.com/board/topic/8425 ... bbrowser2/
Re: Click on a button
Hi HIAC
I have an image (PNG) with the PrtScr of the iWB2 learner when I drag the cursor over the button I want to click on.
I want to put it here and other files to, but I don't know how to do that. I tried to drag the file in this box but unsucceded. Can you, please, teach me?
In the mean time, here is a link to access those files.
https://www.dropbox.com/sh/9ed17tibjr ... 7G1a?dl=0
Can you tell me something more about how to click on that button?
As you can see, it has no ID.
Greats
I have an image (PNG) with the PrtScr of the iWB2 learner when I drag the cursor over the button I want to click on.
I want to put it here and other files to, but I don't know how to do that. I tried to drag the file in this box but unsucceded. Can you, please, teach me?
In the mean time, here is a link to access those files.
https://www.dropbox.com/sh/9ed17tibjr ... 7G1a?dl=0
Can you tell me something more about how to click on that button?
As you can see, it has no ID.
Greats
Re: Click on a button
Perhaps try by class name
Code: Select all
pwb.document.getElementsByClassName("txt_botao1").item(0).click()
Who is online
Users browsing this forum: No registered users and 321 guests