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

Ask general questions here.
jkumud
Posts: 4
Joined: Tue Mar 10, 2015 2:25 pm

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

Post by jkumud » Tue Mar 10, 2015 2:58 pm

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);

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Wed Mar 11, 2015 12:36 pm

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

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7469
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Wed Mar 11, 2015 12:59 pm

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?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

jkumud
Posts: 4
Joined: Tue Mar 10, 2015 2:25 pm

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

Post by jkumud » Wed Mar 11, 2015 2:23 pm

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.

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

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

Post by Ciege » Wed Mar 11, 2015 4:26 pm

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...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

jkumud
Posts: 4
Joined: Tue Mar 10, 2015 2:25 pm

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

Post by jkumud » Thu Mar 12, 2015 1:31 am

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..

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Thu May 07, 2015 10:20 am

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

Fergal
Certified Professional
Certified Professional
Posts: 455
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

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

Post by Fergal » Mon May 18, 2015 9:46 am

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.