ClickHTMLelement does not click

Advanced programming using WinTask scripting language

ClickHTMLelement does not click

Postby mepsztein on Sun Jul 28, 2013 11:50 pm

I have the following statement:

passf=ClickHTMLElement("BUTTON[INNERTEXT= 'Delete Record']")

which does not click the "Delete Record" button and passf returns 0.

If I insert a breakpoint on that statement, it does work.

The only way I was successful is by using the following sequence:

passf=ClickHTMLElement("BUTTON[INNERTEXT= 'Delete Record']")
pause 50 ticks
passf=ClickHTMLElement("BUTTON[INNERTEXT= 'Delete Record']")

This only happens for this particular button. All the other work fine in my script.

Any idea of why this is happening?
mepsztein
 
Posts: 2
Joined: Thu Apr 11, 2013 8:46 pm

Re: ClickHTMLelement does not click

Postby TechSupport on Mon Jul 29, 2013 8:38 am

Hello

It can be either the button not yet ready at its final position within the page use #HTMLPosRetry=1 or = 2 just before the clickhtmlelement line.

Or the click is a bit too much on the left, then add mouse coordinates such as:
ClickHTMLElement("BUTTON[INNERTEXT= 'Delete Record']", left, 5, 5)

Regards.
WinTask Tech Support
TechSupport
 
Posts: 805
Joined: Thu Nov 16, 2006 9:58 am


Return to Scripts programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron