Page 1 of 1

(Click event is working some time and some time not for conr

Posted: Tue Mar 10, 2015 2:58 pm
by jkumud
We are currently using 4.1.5.... Version in Citrix environment with web application...
We have already created around 10 scripts.....
The problem we are facing with Click event....
Click event is working for same control one time.....
But in other run (any run) it tried to perform click....
But unable to fire the click event for that particular control (menu, button).....

Mean we can see that it Clicked on that button & menu but in real mean it unable to fire Click event....

In next run it may click on all control fine so this abrupt behaviour of Click event is unable to understand...
we have used element.EnsureVisible();
element.Focus(); also but even it is not working

Awaiting your response....


element.EnsureVisible();
element.Focus();

Mouse.DoubleClick(element, Location.Center);
// Mouse.DoubleClick(element, System.Windows.Forms.MouseButtons.Left, Location.Center, dr);
//element.As<Unknown>().DoubleClick(System.Windows.Forms.MouseButtons.Left,Location.Center, dr);

Re: (Click event is working some time and some time not for conr

Posted: Wed Mar 11, 2015 12:36 pm
by Support Team
Hello jkumud,

First of all, we highly recommend upgrading to our latest Ranorex version, currently Ranorex 5.3.

As for your issue, we would need more information regarding your application under test in order to analyze the issue. Often, the mentioned behavior occurs due to timing- or focus related issues.

Please send an email regarding your issue to [email protected]

Thanks,
Robert

Re: (Click event is working some time and some time not for conr

Posted: Wed Mar 11, 2015 12:59 pm
by odklizec
Hi,

Do you, by any chance, have the Turbo Mode ON for the failing recording(s)? If so, try to turn it OFF. Turbo Mode can make the mouse clicks to fail, because the clicks are performed too fast and some elements may not be ready at a time of click.

If the Turbo Mode is OFF and the clicks still fail, try to add a small Delay (100ms) before the failing click actions. True, this is not much of a solution if the clicks fail randomly ;)

I think it would be great to have a global option in Ranorex Settings, which would add a small (user defined) delay before each click event. Something like existing option "Delay before pressing a key sequence (ms)" in Settings >> Advanced, just for click events? I'm sure such option would solve many mysterious click failures reported here?

Re: (Click event is working some time and some time not for conr

Posted: Wed Mar 11, 2015 2:23 pm
by jkumud
Hi Team,

We have tried below thing but issue still exists :

Delay.Second(5); // Before each and every click we added 5 second delay
element.EnsureVisible();
element.Focus();
Validate.Exist(element);

If(element.enable)
{
Delay.Second(5); // Before each and every click we added 5 second delay
element.EnsureVisible();
element.Focus();
Validate.Exist(element);
}

Even we tried @visible=true and @enable=true in repository also..but issue still exists..
regarding application under test : Version in Citrix environment with web application...
even it perform click operation but unable to trigger click event in some run …may be in next run it works fine (click and trigger click event)..


awaiting your response.

Re: (Click event is working some time and some time not for conr

Posted: Wed Mar 11, 2015 4:26 pm
by Ciege
Sounds like a timing issue.

May I suggest something to try...

1) Don't use hard coded wait times (delays).
2) Since you mentioned this is a web app, check the readystate of the DOM object and wait until the DOM readystate becomes complete before attempting to click on the element.

It is possible you are clicking on the element before the DOM is actually in a state to accept the click...

Re: (Click event is working some time and some time not for conr

Posted: Thu Mar 12, 2015 1:31 am
by jkumud
Hi,

thanks for your response...

we tried : @state='complete' also in Dom to get page load completely but it did not help...to trigger Click event
note : it is happening with with click event not with other event like Set & get value to any control....
with Click event some time it may work but some time not....

we tried

@state='complete' also in Dom
ensurevisibale()
element.enable / in repo & at code level
element.visible / n repo & at code level
element.focuse
And Validation.exist also

but it dosent help...remember some time it click same control but in other run it Click on control but unable to fire / trigger click event..

can it be because of virtual machine issue because we are executing scripts on Citrix hvd machine (virtual environment)...because i have seen same kind of issue with virtual environment...


Awaiting your response...
Thanks..

Re: (Click event is working some time and some time not for conr

Posted: Thu May 07, 2015 10:20 am
by Support Team
Hello all,

Customer contacted us also via email. Unfortunately, we did not get the chance to analyze the issue in more detail since the customer didn't reply to our questions yet.

Regards,
Robert

Re: (Click event is working some time and some time not for conr

Posted: Mon May 18, 2015 9:46 am
by Fergal
I had similar issues with clicks not working on a web application. This was resolved, by visiting properties for the element in the repository and changing the Adapter Type from "Default" to "Web Element". Not sure if that will work for this issue.