How to click on the web link?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
sooxoos
Posts: 3
Joined: 02 Jul 2019, 22:53

How to click on the web link?

03 Jul 2019, 21:31

How to click on the web link
The code below does not work。how click images?(https www.google.com /imghp?hl=en&tab=wi&ogbl)

Code: Select all

wb := ComObjCreate("InternetExplorer.Application") ; create IE
wb.Visible := true ; show IE
wb.Navigate("www.google.com") ; Navigate Home
sleep 3000
wb.document.getElementById("gb_70").Click

thx!
User avatar
TheDewd
Posts: 1513
Joined: 19 Dec 2013, 11:16
Location: USA

Re: How to click on the web link?

08 Jul 2019, 12:34

Code: Select all

WB := ComObjCreate("InternetExplorer.Application")
WB.Visible := true
WB.Navigate("www.google.com")
Sleep, 4000

Links := WB.document.getElementsbyClassName("gb_d").tags("a")

Loop, % Links.length {
	LinkText := Links[A_Index-1].innerText

	If (LinkText = "Images") {
		Links[A_Index-1].Click()
		Break
	}
}
sooxoos
Posts: 3
Joined: 02 Jul 2019, 22:53

Re: How to click on the web link?

10 Jul 2019, 04:13

thank you...

Can work normally

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], niCode and 150 guests