Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TWebBrowser and Button Clicks


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Sep 1, 2016 10:04 AM Last Post By: Remy Lebeau (Te...
Monty Jones

Posts: 1
Registered: 10/1/16
TWebBrowser and Button Clicks  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 1, 2016 7:49 AM
I am trying to programmatically click on the following button in a page held in TWebBrowser.

It's a 'Favourite' button and it exists somewhere in this lump of html code but for the life of me I can't work out how to do it.

I'm using Delphi 2010. Any help to point me in the right direction would be fantastic.

<div class="button-fave-container">
            <input type="hidden" class="favorite-url" value="/add_favorite_listing.php" />
    <input type="hidden" class="unfavorite-url" value="/remove_favorite_listing.php" />
    <input type="hidden" class="id" name="listing_id" value="475676099" />
    <input type="hidden" class="type" value="listing" />
 
    <input type="hidden" class="favorited-text" value="Favourite" />
    <input type="hidden" class="unfavorited-text" value="Favourite" />
    <input type="hidden" class="favoriting-text" value="Favourite" />
    <input type="hidden" class="unfavoriting-text" value="Favourite" />
 
            <input type="hidden" name="_nnc" value="3:1472741228:kp8B3kzs9HogCRaOPL2B6_ag_kju:d1b1f1e08ce857b9771573a0333d66e3f7dcff412a46ed30b57f5880d0125c46" class="hidden csrf" />
 
                    
        
                            
        <a class="button-fave favorited-button" rel="475676099" alt="Added to favourites">
            <div class="button-spinner"></div>
                        <span class="status-text">Favourite</span>
        </a>
    </div>
     </div>
</div>
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: TWebBrowser and Button Clicks  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 1, 2016 10:04 AM   in response to: Monty Jones in response to: Monty Jones
Monty wrote:

I am trying to programmatically click on the following button in
a page held in TWebBrowser.

It's a 'Favourite' button and it exists somewhere in this lump of
html code but for the life of me I can't work out how to do it.

A real HTML button would be an <input> element with a "type" of "button"
or "submit". In the HTML you have shown, there is no <input> button. There
is a
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02