Simulate a click on a document

Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

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

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

Code: Select all

   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 & VS 2019 & FWH 20.12
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

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

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

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

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

Re: Simulate a click on a document

Post by Horizon »

Hi,

I have an website like that

Code: Select all

<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

    Button := ie:document:getElementsByClassName("disclaimerContainer")
    ? Button:length
Result is 0.

Any idea?
Regards,

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
Post Reply