![]() |
TWebbrower and how to click an image button with no id or tags?
Hello,
I have a problem. Does anyone have any idea how to click an image button with no id or tags in TWebBrowser? The button code is below: <BUTTON aria-disabled=true style="POSITION: relative; WIDTH: 16px" class=x-btn-text tabIndex=0 aria-describedby=x-auto-2 __eventBits="6144"> <IMG style="POSITION: absolute; WIDTH: 12px; BACKGROUND: url( ![]() </BUTTON> Any idea is welcome. |
AW: TWebbrower and how to click an image button with no id or tags?
Hello,
Zitat:
Delphi-Quellcode:
Best regards
procedure TForm1.Button1Click(Sender: TObject);
var d : IHTMLDocument3; c : IHTMLElementCollection; i : Integer; e : IHTMLElement; s : string; begin d := WebBrowser1.Document as IHTMLDocument3; if not Assigned (d) then Exit; c := d.getElementsByTagName ('button'); for i := 0 to c.length - 1 do begin e := c.item (i, EmptyParam) as IHTMLElement; if not Assigned (e) then Exception.Create ('Your message'); if e.className = 'x-btn-text' then begin s := e.getAttribute ('tabIndex', 0); if s = '0' then e.click end end end; |
AW: TWebbrower and how to click an image button with no id or tags?
Volker thank you for your reply. This bastards used a new technique developed only a few months ago. Check this out:
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() They replaced custom html tags and objects with user defined controlled by javascript widgets. That's you you see <button ... instead of <input type=button... |
AW: TWebbrower and how to click an image button with no id or tags?
Volker you are a genious! It really works!
|
AW: TWebbrower and how to click an image button with no id or tags?
Danke Volker, diese Routine klappt hervorragend...
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:52 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz