Simulate a click on a document

Horizon
Posts: 1326
Joined: Fri May 23, 2008 1:33 pm
Has thanked: 5 times

Re: Simulate a click on a document

Post by Horizon »

Giovany Vecchi wrote:Hello try this way

Button := ie:document:All:Item("btn red-flamingo",0)
Button:Click(.t.)


Code: Select all | Expand

    Button := ie:document:All:Item("btn red-flamingo",0)
    Button:Click(.t.)


it gives an error. :(

Code: Select all | Expand

  Error description: Error BASE/1004  No exported method: CLICK
   Args:
     [   1] = U  
     [   2] = L   .T.

Stack Calls
===========
   Called from:  => CLICK( 0 )
   Called from: .\ICRA_LBT.prg => WEB_DENEME( 719 )
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
Posts: 1326
Joined: Fri May 23, 2008 1:33 pm
Has thanked: 5 times

Re: Simulate a click on a document

Post by Horizon »

Hi,

This code is ok. just adding .t. parameters in click method.

Code: Select all | Expand

    Button  := ie:document:getElementsByClassName("btn red-flamingo")

        Button[0]:click(.t.)
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
Posts: 1326
Joined: Fri May 23, 2008 1:33 pm
Has thanked: 5 times

Re: Simulate a click on a document

Post by Horizon »

Hi,

I have an website like that

Code: Select all | Expand

<div class="disclaimerContainer" role="alert">
                Eğer E-Devlet E-İmza Uygulamasını indirmediyseniz indirmek için
                <a href="https://static.turkiye.gov.tr/downloads/e-imza/edevlet-eimza.jnlp" target="_blank">
                        tıklayınız</a>.
            </div>



Code: Select all | Expand

    Button := ie:document:getElementsByClassName("disclaimerContainer")
    ? Button:length


Result is 0.

Any idea?
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Post Reply