Jump to content
Sign in to follow this  
sammy1983

No "name" or "id" on Search button

Recommended Posts

sammy1983

Hi,

I have a Search button on a webpage but the button doesn't have "name" or "id". Attached is for reference. How can I click on it?

post-80752-0-54346900-1392839035_thumb.j

Share this post


Link to post
Share on other sites
Danp2

You didn't specify a browser, so I am going to assume IE. See the help file entry for _IEFormElementGetCollection. If you search the forums, you should find plenty of examples that will point you in the right direction.

Share this post


Link to post
Share on other sites
bogQ

can you try to call that func instead of click ?

 

$Pagebuffer.document.parentwindow.execScript('javascript:search()', "javascript")

or

$Pagebuffer.document.parentwindow.execScript('search()', "javascript")

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
sammy1983

can you try to call that func instead of click ?

 

$Pagebuffer.document.parentwindow.execScript('javascript:search()', "javascript")

or

$Pagebuffer.document.parentwindow.execScript('search()', "javascript")

 

Below code worked. Thanks.

$oLinks = _IETagNameGetCollection($oIE, "input")
For $oLink In $oLinks
If String($oLink.type) = "button" And String($oLink.value) = "Search" Then
 _IEAction($oLink, "click")
 ExitLoop
EndIf
Next
_IELoadWait($oIE, 1000)

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
Sign in to follow this  

×