Jump to content

IE Click Page Location


Recommended Posts

Is there a way to click a given area on a web page?

I know many functions (_IEAction, _IEImgClick, etc.) that could theoretically do this, however, I have a page that has multiple div's nested.

I can identify the area (i.e. the "top" and "left") of where I would like to click through finding the background image of a div on a lower z-index. However, clicking that specific div will not do anything: I have to simulate a click on an "unknown" div that is layered above it on the z-index. These divisions do not have id's or names, just some styling in the outerhtml.

Is there a way to click on that "area"?

Below is an example of how the html of the divisions look for an "instance" I would like to be able to click:

<DIV style="BACKGROUND-IMAGE: url(http://url_removed/resource/webfrontend/townlayer/building_harbour.png); Z-INDEX: 40016; POSITION: absolute; WIDTH: 128px; BACKGROUND-POSITION: 0% 0%; HEIGHT: 128px; TOP: 1232px; LEFT: 2176px" Step="5" Frame="1"></DIV>
<DIV style="BACKGROUND-IMAGE: url(http://url_removed/resource/webfrontend/townlayer/animations/anim_harbour_01/animseq_harbour_01.png); Z-INDEX: 40016; POSITION: absolute; WIDTH: 128px; BACKGROUND-POSITION: 0px 50%; HEIGHT: 128px; TOP: 1232px; LEFT: 2176px" Step="4" Frame="0"></DIV>
<DIV style="Z-INDEX: 990000; POSITION: absolute; WIDTH: 128px; HEIGHT: 80px; TOP: 1280px; LEFT: 2176px" id=69649></DIV>
<DIV style="BACKGROUND-IMAGE: url(http://url_removed/resource/webfrontend/ui/building_level_display_bgr.png); Z-INDEX: 500000; POSITION: absolute; WIDTH: 24px; HEIGHT: 24px; TOP: 1322px; LEFT: 2229px" id=69649>
<DIV style="POSITION: absolute; TEXT-ALIGN: center; WIDTH: 24px; HEIGHT: 24px; COLOR: #ffbd78; VERTICAL-ALIGN: middle; TOP: 1px; FONT-WEIGHT: bold; LEFT: -1px">7</DIV></DIV>
Edited by Affe

[center][/center]

Link to comment
Share on other sites

_IEPropertyGet has an example of getting coordinates and then using MouseMove. Use it as a guide and then use MouseClick instead.

Dale

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...