i want 2 do this thing,
open google chrome then after 5 seconds it will click a link "Continue"
how 2 do that????
help me to open google chrome then click a link
Moderators: Dorian (MJT support), JRL
-
- Newbie
- Posts: 6
- Joined: Tue Aug 17, 2010 5:04 am
- Marcus Tettmar
- Site Admin
- Posts: 7380
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Does this have to be done in Chrome? Only it is much easier to automate IE as it can be done via VBScript or WebRecorder transparently via IE's COM interface and Documemt Object Model.
However, if the link URL of the "Continue" link never changes you could simply navigate to it.
Really to help you we'd need to see the page. Can you send the URL of the page and show us which link needs to be "Clicked"?
However, if the link URL of the "Continue" link never changes you could simply navigate to it.
Really to help you we'd need to see the page. Can you send the URL of the page and show us which link needs to be "Clicked"?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 6
- Joined: Tue Aug 17, 2010 5:04 am
here is the url the link in the text continue always changes . tell me how to do it. i m newbie in codes.
http://mobitop.org/top/in.php?sid=4122[/url]
http://mobitop.org/top/in.php?sid=4122[/url]
- Marcus Tettmar
- Site Admin
- Posts: 7380
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Here you go. This does it via IE:
Code: Select all
//Set up some VBS functions for use later
VBSTART
Dim IE
Sub CreateIE
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible=1
End Sub
Sub Navigate(URL)
IE.Navigate URL
End Sub
Sub WaitBusy
do while IE.Busy
loop
End Sub
Sub KillIE
IE.Quit
Set IE = nothing
End Sub
Sub ClickLink(text)
Dim FormNr
Dim ItemNr
Dim TheForm
Dim anchors
Set anchors = IE.document.All.Tags("A")
if anchors.Length = 0 then
MsgBox("No anchors found in page")
else
for AnchorNr = 0 to anchors.Length - 1
Set TheAnchor = anchors(AnchorNr)
if TheAnchor.innertext = text then
TheAnchor.Click
exit for
end if
next
end if
End Sub
VBEND
//Do the business .....
VBRun>CreateIE
//Focus the new IE window
VBEval>IE.Hwnd,ie_handle
Let>WIN_USEHANDLE=1
SetFocus>ie_handle
Let>WIN_USEHANDLE=0
VBRun>Navigate,http://mobitop.org/top/in.php?sid=4122
VBRun>WaitBusy
Wait>1
VBRun>ClickLink,Continue
VBRun>WaitBusy
Wait>1
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 6
- Joined: Tue Aug 17, 2010 5:04 am
- Marcus Tettmar
- Site Admin
- Posts: 7380
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Have a look at the code I sent, and the source of the html of the page with the button and you should be able to figure it out for yourself.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 1
- Joined: Thu May 25, 2017 7:17 am
Re: help me to open google chrome then click a link
I want to get table data from money control website. http://www.moneycontrol.com/financials/ ... results/IT. I want to use google chrome to open this link and then click on previous years link and get that table too along with the table on that page. I need to click previous years as the url even after clicking previous years remains the same and I cannot directly navigate to it. It is easy with internet explorer but I cannot use it.