Hello community,
I've got following code (I refresh the Hwnd everytime - not the problem)
$oIE = _IEAttach("0x00050472", "HWND")
$aArray = _IEGetObjByClass($oIE, "classname", "div")
$o = $aArray[3]
;Click $o
Func _IEGetObjByClass($oIE, $sClass, $sTag = "*")
Local $aRet[1] = [0]
Local $allHTMLTags = _IETagNameGetCollection($oIE, $sTag)
For $o In $allHTMLTags
If IsString($o.className) And $o.className = $sClass Then
$aRet[0] += 1
ReDim $aRet[$aRet[0] + 1]
$aRet[$aRet[0]] = $o
EndIf
Next
Return $aRet
EndFunc ;==>_IEGetObjByClass
and this is the html code
<span id="someNumbers">
<div title="title_something" class="classname" style="padding: 0px 5px;">
<a onclick=" javascript:someJob(id, this); ">Text</a>
</div>
</span>
$o.innerText is giving me "Text" and anyway I have no problems to get the values.
My problem is that I cannot click this span/div.
I tried:
1. Open javascript:OrdersType(id, this) with _IENavigate
2. fireEvent("whatever you can do with fireEvent")
3. _IEAction
I cannot use the id of the span because its variable like everything else. The only static thing is the text between the <a></a> tags.
The span is generated dynamically so I cannot find it in the regular source code when using IE. With _IEBodyReadHTML I see the source code like it has to be.
How can I click that span?
Thanks in advance.
JimmyBeam