Sign in to follow this  
Followers 0
sdfg4545

_IEGetObjByName: what is second parameter

6 posts in this topic

I understand that the first parameter is an object representing IE.

I need to identify a link on the page, so I can click it with _IEAction

$oSubmit = _IEGetObjByName ($oIE, "second_parameter")

_IEAction ($oSubmit, "click")

Is the second parameter the text on the web page?

Or, is it the text in the HTML source? (This will be difficult to seperate the text from all the formatting codes and javascript).

In my case:

On web page: "Wait Time Information System (WTIS)"

Source: <A class=3Dblack_link=20 href=3D"javascript:go('/link.yawst=3Diauto&amp;a=3D1&amp;b=3D11&amp;c=3D=1', 'misc')">Wait=20 Time Information System=20(WTIS)</A>

Share this post


Link to post
Share on other sites



The seconds parameter of _IEGetObjByName is the name of the object, which can be found in the HTML source. You have to go to the web page you're trying to get the obj on, and open the source, and look around til you find the name. Some objs like some buttons don't have names, just values, which makes getting them a bit harder.

What are you trying to do on "Wait Time Information System (WTIS)"?


RAWR! I'm hungry :( Feed the panda squirrle

Share this post


Link to post
Share on other sites

see _IELinkClickByText


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

"Wait Time Information System (WTIS)" is a link on a web page that I am trying to get to. This is the HTML code:

<A class=3Dblack_link=20

=

href=3D"javascript:go('/link.yaws?t=3Diauto&amp;a=3D1&amp;b=3D11&amp;c=3D=

1', 'misc')">Wait=20

Time Information System=20

(WTIS)</A>

ClickLinkByText doesnt work either. Maybe there is too much formatting in the link...

The only way I can get to it is by submitting 15 tab characters and then the enter key.

Disapointing.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

"Too much formatting" cannot be the cause of your trouble. If it's disappointing, its because you don't know how to use the function yet.

From the HTML in your last post, the link text is "Wait=20Time Information System=20(WTIS)". The text must match exactly what is between the <a> and </a>.

Also note that people are often fooled by Frames and iFrames as what you are looking at may not actually exist in the top-level document and you must use the _IEFrame* functions to drill in.

Dale

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Thanks Dale,

I'll try using the text between the anchor (<a>) elements.

I think I am being fooled by the frames. I will have to look into that.

H

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  
Followers 0